Blob Blame History Raw
commit 26ffd5e6c7f110cc439bb054fac9567885ffc197
Author: Roland McGrath <roland@hack.frob.com>
Date:   Fri Jun 20 20:04:47 2014 -0700

    Clean up HAVE_CONFIG_H and STDC_HEADERS.

Conflicts:
	locale/Makefile

Due to separate IS_IN backport in glibc-rh1256317-2.patch.

diff --git a/catgets/Makefile b/catgets/Makefile
index 361894a94d6cb740..a1e3e376773de28c 100644
--- a/catgets/Makefile
+++ b/catgets/Makefile
@@ -39,8 +39,7 @@ include ../Rules
 
 $(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o)
 
-catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"' \
-	    -DHAVE_CONFIG_H
+catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"'
 
 generated = de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
 	    test-gencat.h
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 0f47900922d4099b..bf98c33cf3ba9df6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -59,6 +59,19 @@
 
 #include <config.h>
 
+/* Define this for the benefit of portable GNU code that wants to check it.
+   Code that checks with #if will not #include <config.h> again, since we've
+   already done it (and this file is implicitly included in every compile,
+   via -include).  Code that checks with #ifdef will #include <config.h>,
+   but that file should always be idempotent (i.e., it's just #define/#undef
+   and nothing else anywhere should be changing the macro state it touches),
+   so it's harmless.  */
+#define HAVE_CONFIG_H	0
+
+/* Define this for the benefit of portable GNU code that wants to check it.
+   Of course, it's never false when building libc!  */
+#define STDC_HEADERS	1
+
 /* The symbols in all the user (non-_) macros are C symbols.  */
 
 #if !defined HAVE_ASM_WEAK_DIRECTIVE && !defined HAVE_ASM_WEAKEXT_DIRECTIVE
diff --git a/locale/Makefile b/locale/Makefile
index 2755340dd91bfad6..edd982fe87ca66cb 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -87,8 +87,7 @@ locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \
 CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \
 			   -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
 			   -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
-			   -DLOCSRCDIR='"$(i18ndir)/locales"' \
-			   -DHAVE_CONFIG_H
+			   -DLOCSRCDIR='"$(i18ndir)/locales"'
 
 CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
 CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
diff --git a/stdlib/strtol_l.c b/stdlib/strtol_l.c
index 615190821e24b41a..8174d22f060c2149 100644
--- a/stdlib/strtol_l.c
+++ b/stdlib/strtol_l.c
@@ -25,7 +25,6 @@
 
 #ifdef _LIBC
 # define USE_NUMBER_GROUPING
-# define STDC_HEADERS
 # define HAVE_LIMITS_H
 #endif