[uClibc-cvs] uClibc/extra/config confdata.c,1.7,1.8

Erik Andersen andersen at uclibc.org
Tue Oct 21 00:52:23 UTC 2003


Update of /var/cvs/uClibc/extra/config
In directory winder:/tmp/cvs-serv17092

Modified Files:
	confdata.c 
Log Message:
Doh!  In include/bits/uClibc_config.h when we define things, we appropriately
prepend "__".  Unfortunately, when we #undef things, we do not prepend the
"__".  This results in collateral damage to unsuspecting applications as we
undefine random unrelated macros.  Oops.

For example, when compiling xfree86, libGLcore.a defines MALLOC for its own usage.
But include/bits/uClibc_config.h then does an 
    #undef MALLOC
    #define __MALLOC_930716__ 1
which inadvertantly trashes the define from libGLcore....  Ouch.

The autogenerated include/bits/uClibc_config.h should instead have
contained:
    #undef __MALLOC__
    #define __MALLOC_930716__ 1

This patch makes that happen.


Index: confdata.c
===================================================================
RCS file: /var/cvs/uClibc/extra/config/confdata.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- confdata.c	5 Aug 2003 01:52:38 -0000	1.7
+++ confdata.c	21 Oct 2003 00:52:14 -0000	1.8
@@ -347,7 +347,7 @@
 				case no:
 					fprintf(out, "# %s is not set\n", sym->name);
 					if (out_h)
-						fprintf(out_h, "#undef %s\n", sym->name);
+						fprintf(out_h, "#undef __%s__\n", sym->name);
 					break;
 				case mod:
 					fprintf(out, "%s=m\n", sym->name);




More information about the uClibc-cvs mailing list