This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Remove _G_NEED_STDARG_H
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Thu, 20 Sep 2012 00:54:07 +0000
- Subject: Remove _G_NEED_STDARG_H
Continuing the cleanup of bits of sysdeps configuration of libio via
_G_config.h that may have been relevant when libio was also used in
libstdc++ but are irrelevant now it is only built as part of glibc,
this patch removes _G_NEED_STDARG_H. That macro is defined in all
versions of _G_config.h and tested in one place in libio/libio.h; the
patch makes that code in libio.h unconditional.
Tested x86_64 that the code generated for glibc's shared libraries is
identical before and after the patch.
2012-09-20 Joseph Myers <joseph@codesourcery.com>
* libio/libio.h [_G_NEED_STDARG_H]: Make code unconditional.
* sysdeps/generic/_G_config.h (_G_NEED_STDARG_H): Remove.
* sysdeps/gnu/_G_config.h (_G_NEED_STDARG_H): Remove.
* sysdeps/mach/hurd/_G_config.h (_G_NEED_STDARG_H): Remove.
diff --git a/libio/libio.h b/libio/libio.h
index 14bb9a6..5fe1bac 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -47,15 +47,13 @@
#define _IO_va_list _G_va_list
#define _IO_wint_t _G_wint_t
-#ifdef _G_NEED_STDARG_H
/* This define avoids name pollution if we're using GNU stdarg.h */
-# define __need___va_list
-# include <stdarg.h>
-# ifdef __GNUC_VA_LIST
-# undef _IO_va_list
-# define _IO_va_list __gnuc_va_list
-# endif /* __GNUC_VA_LIST */
-#endif
+#define __need___va_list
+#include <stdarg.h>
+#ifdef __GNUC_VA_LIST
+# undef _IO_va_list
+# define _IO_va_list __gnuc_va_list
+#endif /* __GNUC_VA_LIST */
#ifndef __P
# include <sys/cdefs.h>
diff --git a/sysdeps/generic/_G_config.h b/sysdeps/generic/_G_config.h
index 71974ca..139f746 100644
--- a/sysdeps/generic/_G_config.h
+++ b/sysdeps/generic/_G_config.h
@@ -53,7 +53,6 @@ typedef union
/* These library features are always available in the GNU C library. */
#define _G_HAVE_SYS_WAIT 1
-#define _G_NEED_STDARG_H 1
#define _G_va_list __gnuc_va_list
#define _G_HAVE_MMAP 1
diff --git a/sysdeps/gnu/_G_config.h b/sysdeps/gnu/_G_config.h
index 604fa2e..313f35a 100644
--- a/sysdeps/gnu/_G_config.h
+++ b/sysdeps/gnu/_G_config.h
@@ -53,7 +53,6 @@ typedef union
/* These library features are always available in the GNU C library. */
#define _G_HAVE_SYS_WAIT 1
-#define _G_NEED_STDARG_H 1
#define _G_va_list __gnuc_va_list
#define _G_HAVE_MMAP 1
diff --git a/sysdeps/mach/hurd/_G_config.h b/sysdeps/mach/hurd/_G_config.h
index 70de3c6..7d6baef 100644
--- a/sysdeps/mach/hurd/_G_config.h
+++ b/sysdeps/mach/hurd/_G_config.h
@@ -53,7 +53,6 @@ typedef union
/* These library features are always available in the GNU C library. */
#define _G_HAVE_SYS_WAIT 1
-#define _G_NEED_STDARG_H 1
#define _G_va_list __gnuc_va_list
#define _G_HAVE_MMAP 1
--
Joseph S. Myers
joseph@codesourcery.com