summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-09-08 15:36:17 +0200
committerSimon Josefsson <simon@josefsson.org>2008-09-08 15:36:17 +0200
commit4bcd479c96ccd4ee7994ca81cb28b2fc41a80d28 (patch)
tree5c6e89c9474b3ab2055afff8baf7ae5d7b7d96be
parent9ada050dc47008b1aeae9223d960e2d127aac9d9 (diff)
downloadlibtasn1-4bcd479c96ccd4ee7994ca81cb28b2fc41a80d28.tar.gz
libtasn1-4bcd479c96ccd4ee7994ca81cb28b2fc41a80d28.tar.bz2
libtasn1-4bcd479c96ccd4ee7994ca81cb28b2fc41a80d28.zip
Update gnulib files.
-rw-r--r--gl/Makefile.am18
-rw-r--r--gl/m4/include_next.m432
-rw-r--r--gl/stdarg.in.h2
-rw-r--r--gl/stdint.in.h3
-rw-r--r--gl/stdlib.in.h2
-rw-r--r--gl/string.in.h2
-rw-r--r--gl/unistd.in.h2
-rw-r--r--gl/wchar.in.h2
8 files changed, 49 insertions, 14 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 27259a8..faa6079 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -133,7 +133,8 @@ BUILT_SOURCES += $(STDARG_H)
stdarg.h: stdarg.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
< $(srcdir)/stdarg.in.h; \
} > $@-t
@@ -154,7 +155,8 @@ stdint.h: stdint.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
- -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
@@ -193,7 +195,8 @@ BUILT_SOURCES += stdlib.h
stdlib.h: stdlib.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
@@ -247,7 +250,8 @@ BUILT_SOURCES += string.h
string.h: string.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
-e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
@@ -324,7 +328,8 @@ unistd.h: unistd.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
- -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
@@ -383,7 +388,8 @@ BUILT_SOURCES += $(WCHAR_H)
wchar.h: wchar.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index a842e2a..b6e4d3a 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 6
+# include_next.m4 serial 8
dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,21 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert and Derek Price.
+dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
+dnl
+dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
+dnl 'include' otherwise.
+dnl
+dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
+dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
+dnl '#pragma GCC system_header' has the same effect as if the file was found
+dnl through the include search path specified with '-isystem' options (as
+dnl opposed to the search path specified with '-I' options). Namely, gcc
+dnl does not warn about some things, and on some systems (Solaris and Interix)
+dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
+dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
+dnl of plain '__STDC__'.
+
AC_DEFUN([gl_INCLUDE_NEXT],
[
AC_LANG_PREPROC_REQUIRE()
@@ -13,8 +28,12 @@ AC_DEFUN([gl_INCLUDE_NEXT],
[gl_cv_have_include_next],
[rm -rf conftestd1 conftestd2
mkdir conftestd1 conftestd2
+ dnl The include of <stdio.h> is because IBM C 9.0 on AIX 6.1 supports
+ dnl include_next when used as first preprocessor directive in a file,
+ dnl but not when preceded by another include directive.
cat <<EOF > conftestd1/conftest.h
#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
#include_next <conftest.h>
#ifdef DEFINED_IN_CONFTESTD2
int foo;
@@ -36,18 +55,17 @@ EOF
CPPFLAGS="$save_CPPFLAGS"
rm -rf conftestd1 conftestd2
])
+ PRAGMA_SYSTEM_HEADER=
if test $gl_cv_have_include_next = yes; then
-
- dnl FIXME: Remove HAVE_INCLUDE_NEXT and update everything that uses it
- dnl to use @INCLUDE_NEXT@ instead.
- AC_DEFINE([HAVE_INCLUDE_NEXT], 1,
- [Define if your compiler supports the #include_next directive.])
-
INCLUDE_NEXT=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
else
INCLUDE_NEXT=include
fi
AC_SUBST([INCLUDE_NEXT])
+ AC_SUBST([PRAGMA_SYSTEM_HEADER])
])
# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index 6a054dd..3597baf 100644
--- a/gl/stdarg.in.h
+++ b/gl/stdarg.in.h
@@ -17,6 +17,8 @@
#ifndef _GL_STDARG_H
+@PRAGMA_SYSTEM_HEADER@
+
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STDARG_H@
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index 67baceb..5510396 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2008 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -49,6 +49,7 @@
in <inttypes.h> would reinclude us, skipping our contents because
_GL_STDINT_H is defined.
The include_next requires a split double-inclusion guard. */
+@PRAGMA_SYSTEM_HEADER@
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
#endif
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index b0fb12f..a55c333 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -15,6 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+@PRAGMA_SYSTEM_HEADER@
+
#if defined __need_malloc_and_calloc
/* Special invocation convention inside glibc header files. */
diff --git a/gl/string.in.h b/gl/string.in.h
index 28c9346..f53381b 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -18,6 +18,8 @@
#ifndef _GL_STRING_H
+@PRAGMA_SYSTEM_HEADER@
+
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRING_H@
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 17b29af..8f0acf6 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -17,6 +17,8 @@
#ifndef _GL_UNISTD_H
+@PRAGMA_SYSTEM_HEADER@
+
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index f796167..874bbf4 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -26,6 +26,8 @@
* the declaration of wcwidth().
*/
+@PRAGMA_SYSTEM_HEADER@
+
#ifdef __need_mbstate_t
/* Special invocation convention inside uClibc header files. */