[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] [PATCH] Explicitly include <gnu/option-groups.h>



I've noticed that some of the files that use macros defined in <gnu/option-groups.h> do not explicitly include this header. In couple of cases (in tests, luckily) this caused the header not being included at all.

The attached patch adds inclusion of <gnu/option-groups.h> to every file that needs it.

OK for trunk?

Thank you,

--
Maxim Kuvyrkov
CodeSourcery
maxim@xxxxxxxxxxxxxxxx
(650) 331-3385 x724
2009-11-09  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>

	* libio/fileops.c, libio/iosetbuffer.c,
	* nptl/sysdeps/pthread/small-macros-fns.c, posix/fnmatch_loop.c,
        * posix/regcomp.c, posix/regexec.c, stdio-common/tst-sprintf.c,
	* stdio-common/tstdiomisc.c, sysdeps/ieee754/ldbl-opt/nldbl-compat.c,
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h: Explicitly include
	<gnu/option-groups.h>.
 libio/fileops.c                         |    1 +
 libio/iosetbuffer.c                     |    2 ++
 nptl/sysdeps/pthread/small-macros-fns.c |    2 ++
 posix/fnmatch_loop.c                    |    2 ++
 posix/regcomp.c                         |    2 ++
 posix/regexec.c                         |    2 ++
 stdio-common/tst-sprintf.c              |    1 +
 stdio-common/tstdiomisc.c               |    1 +
 sysdeps/ieee754/ldbl-opt/nldbl-compat.c |    1 +
 sysdeps/ieee754/ldbl-opt/nldbl-compat.h |    1 +
 10 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/libio/fileops.c b/libio/fileops.c
index 94bbf83..d2bcfd7 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -40,6 +40,7 @@
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
+#include <gnu/option-groups.h>
 #ifdef __STDC__
 #include <stdlib.h>
 #endif
diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c
index 917f905..5c1906c 100644
--- a/libio/iosetbuffer.c
+++ b/libio/iosetbuffer.c
@@ -26,6 +26,8 @@
    This exception applies to code released by its copyright holders
    in files containing the exception.  */
 
+#include <gnu/option-groups.h>
+
 #include "libioP.h"
 
 void
diff --git a/nptl/sysdeps/pthread/small-macros-fns.c b/nptl/sysdeps/pthread/small-macros-fns.c
index 55cf75e..f751053 100644
--- a/nptl/sysdeps/pthread/small-macros-fns.c
+++ b/nptl/sysdeps/pthread/small-macros-fns.c
@@ -17,6 +17,8 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <gnu/option-groups.h>
+
 /* Handle macros from ./bits/libc-lock.h.  */
 #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
 
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
index cecc36c..5bec8cc 100644
--- a/posix/fnmatch_loop.c
+++ b/posix/fnmatch_loop.c
@@ -17,6 +17,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <gnu/option-groups.h>
+
 struct STRUCT
 {
   const CHAR *pattern;
diff --git a/posix/regcomp.c b/posix/regcomp.c
index e2e9ad0..9afa69a 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -19,6 +19,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <gnu/option-groups.h>
+
 static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
 					  size_t length, reg_syntax_t syntax);
 static void re_compile_fastmap_iter (regex_t *bufp,
diff --git a/posix/regexec.c b/posix/regexec.c
index 78b4d96..ad38ecb 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -18,6 +18,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <gnu/option-groups.h>
+
 static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
 				     int n) internal_function;
 static void match_ctx_clean (re_match_context_t *mctx) internal_function;
diff --git a/stdio-common/tst-sprintf.c b/stdio-common/tst-sprintf.c
index e26b978..bfa79c9 100644
--- a/stdio-common/tst-sprintf.c
+++ b/stdio-common/tst-sprintf.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <gnu/option-groups.h>
 
 
 int
diff --git a/stdio-common/tstdiomisc.c b/stdio-common/tstdiomisc.c
index 356d50a..d8bb096 100644
--- a/stdio-common/tstdiomisc.c
+++ b/stdio-common/tstdiomisc.c
@@ -3,6 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <wchar.h>
+#include <gnu/option-groups.h>
 
 static int
 t1 (void)
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
index a615b2e..5d06d0e 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
@@ -27,6 +27,7 @@
 #include <locale/localeinfo.h>
 #include <sys/syslog.h>
 #include <bits/libc-lock.h>
+#include <gnu/option-groups.h>
 
 #include "nldbl-compat.h"
 
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
index 98cc533..b94d6a4 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
@@ -31,6 +31,7 @@
 #include <math.h>
 #include <monetary.h>
 #include <sys/syslog.h>
+#include <gnu/option-groups.h>
 
 
 /* Declare the __nldbl_NAME function the wrappers call that's in libc.so.  */