summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-12-01 21:55:02 +0100
committerSimon Josefsson <simon@josefsson.org>2008-12-01 21:55:02 +0100
commit1fd55e6c31382dcb274db911f62d14215bfec135 (patch)
tree0974c1dfc3eac05ca161d366e434b196a4c2e0b8 /gl
parent941e2538bd2b75475f74f48904e3a7b18a219306 (diff)
downloadgnutls-1fd55e6c31382dcb274db911f62d14215bfec135.tar.gz
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r--gl/Makefile.am2
-rw-r--r--gl/m4/gnulib-cache.m43
-rw-r--r--gl/m4/gnulib-comp.m41
-rw-r--r--gl/m4/include_next.m452
-rw-r--r--gl/m4/warnings.m488
-rw-r--r--gl/stdint.in.h72
-rw-r--r--gl/sys_time.in.h8
7 files changed, 102 insertions, 124 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index e2c075879d..7aa2f12541 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 listen maintainer-makefile minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
AUTOMAKE_OPTIONS = 1.5 gnits
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 6e42289883..80ecea9309 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 listen maintainer-makefile minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
@@ -39,6 +39,7 @@ gl_MODULES([
lgpl-2.1
listen
maintainer-makefile
+ manywarnings
minmax
perror
pmccabe2html
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 12870c683b..ea89089432 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -439,6 +439,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/longlong.m4
m4/lseek.m4
m4/malloc.m4
+ m4/manywarnings.m4
m4/minmax.m4
m4/netdb_h.m4
m4/netinet_in_h.m4
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index c70c4133a0..062753c588 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 9
+# include_next.m4 serial 10
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,
@@ -11,6 +11,10 @@ dnl
dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
dnl 'include' otherwise.
dnl
+dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler
+dnl supports it in the special case that it is the first include directive in
+dnl the given file, or to '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
@@ -26,12 +30,26 @@ AC_DEFUN([gl_INCLUDE_NEXT],
AC_LANG_PREPROC_REQUIRE()
AC_CACHE_CHECK([whether the preprocessor supports include_next],
[gl_cv_have_include_next],
- [rm -rf conftestd1 conftestd2
- mkdir conftestd1 conftestd2
+ [rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b 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
+ dnl but not when preceded by another include directive. Additionally,
+ dnl with this same compiler, include_next is a no-op when used in a
+ dnl header file that was included by specifying its absolute file name.
+ dnl Despite these two bugs, include_next is used in the compiler's
+ dnl <math.h>. By virtue of the second bug, we need to use include_next
+ dnl as well in this case.
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h
#define DEFINED_IN_CONFTESTD1
#include <stdio.h>
#include_next <conftest.h>
@@ -47,24 +65,36 @@ EOF
#endif
#define DEFINED_IN_CONFTESTD2
EOF
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
AC_COMPILE_IFELSE([#include <conftest.h>],
[gl_cv_have_include_next=yes],
- [gl_cv_have_include_next=no])
- CPPFLAGS="$save_CPPFLAGS"
- rm -rf conftestd1 conftestd2
+ [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ AC_COMPILE_IFELSE([#include <conftest.h>],
+ [gl_cv_have_include_next=buggy],
+ [gl_cv_have_include_next=no])
+ ])
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ rm -rf conftestd1a conftestd1b conftestd2
])
PRAGMA_SYSTEM_HEADER=
if test $gl_cv_have_include_next = yes; then
INCLUDE_NEXT=include_next
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
if test -n "$GCC"; then
PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
fi
else
- INCLUDE_NEXT=include
+ if test $gl_cv_have_include_next = buggy; then
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ else
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+ fi
fi
AC_SUBST([INCLUDE_NEXT])
+ AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
AC_SUBST([PRAGMA_SYSTEM_HEADER])
])
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index 3585c3eebc..c32cf4ed66 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,4 +1,4 @@
-# warnings.m4 serial 1
+# warnings.m4 serial 2
dnl Copyright (C) 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,
@@ -42,89 +42,3 @@ AS_VAR_POPDEF([gl_Flags])dnl
AS_VAR_POPDEF([gl_Warn])dnl
m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
])
-
-# gl_WARN_SUPPORTED(VARIABLE)
-# ----------------------
-# Add all supported warning parameters to variable VARIABLE.
-AC_DEFUN([gl_WARN_SUPPORTED],
-[
- FOO=
- # List of all supported warning parameters according to GCC 4.3.2 manual.
- for w in \
- -Wall \
- -W \
- -Wformat-y2k \
- -Wformat-nonliteral \
- -Wformat-security \
- -Winit-self \
- -Wmissing-include-dirs \
- -Wswitch-default \
- -Wswitch-enum \
- -Wunused \
- -Wunknown-pragmas \
- -Wstrict-aliasing \
- -Wstrict-overflow \
- -Wsystem-headers \
- -Wfloat-equal \
- -Wtraditional \
- -Wtraditional-conversion \
- -Wdeclaration-after-statement \
- -Wundef \
- -Wshadow \
- -Wunsafe-loop-optimizations \
- -Wpointer-arith \
- -Wbad-function-cast \
- -Wc++-compat \
- -Wcast-qual \
- -Wcast-align \
- -Wwrite-strings \
- -Wconversion \
- -Wsign-conversion \
- -Wlogical-op \
- -Waggregate-return \
- -Wstrict-prototypes \
- -Wold-style-definition \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wmissing-noreturn \
- -Wmissing-format-attribute \
- -Wpacked \
- -Wpadded \
- -Wredundant-decls \
- -Wnested-externs \
- -Wunreachable-code \
- -Winline \
- -Winvalid-pch \
- -Wlong-long \
- -Wvla \
- -Wvolatile-register-var \
- -Wdisabled-optimization \
- -Wstack-protector \
- -Woverlength-strings \
- ; do
- FOO="$FOO $w"
- done
- $1=$FOO
-])
-
-# gl_WARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR)
-# ----------------------
-# Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR.
-# Elements separated by whitespace. In set logic terms, the function
-# does OUTVAR = LISTVAR \ REMOVEVAR.
-AC_DEFUN([gl_WARN_COMPLEMENT],
-[
- gl_warn_set=
- set x $2; shift
- for gl_warn_item
- do
- case " $3 " in
- *" $gl_warn_item "*)
- ;;
- *)
- gl_warn_set="$gl_warn_set $gl_warn_item"
- ;;
- esac
- done
- $1=$gl_warn_set
-])
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index e246aa9724..099a2cf9b6 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -122,46 +122,58 @@
#undef int8_t
#undef uint8_t
-#define int8_t signed char
-#define uint8_t unsigned char
+typedef signed char gl_int8_t;
+typedef unsigned char gl_uint8_t;
+#define int8_t gl_int8_t
+#define uint8_t gl_uint8_t
#undef int16_t
#undef uint16_t
-#define int16_t short int
-#define uint16_t unsigned short int
+typedef short int gl_int16_t;
+typedef unsigned short int gl_uint16_t;
+#define int16_t gl_int16_t
+#define uint16_t gl_uint16_t
#undef int32_t
#undef uint32_t
-#define int32_t int
-#define uint32_t unsigned int
+typedef int gl_int32_t;
+typedef unsigned int gl_uint32_t;
+#define int32_t gl_int32_t
+#define uint32_t gl_uint32_t
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
#if LONG_MAX >> 31 >> 31 == 1
# undef int64_t
-# define int64_t long int
+typedef long int gl_int64_t;
+# define int64_t gl_int64_t
# define GL_INT64_T
#elif defined _MSC_VER
# undef int64_t
-# define int64_t __int64
+typedef __int64 gl_int64_t;
+# define int64_t gl_int64_t
# define GL_INT64_T
#elif @HAVE_LONG_LONG_INT@
# undef int64_t
-# define int64_t long long int
+typedef long long int gl_int64_t;
+# define int64_t gl_int64_t
# define GL_INT64_T
#endif
#if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t
-# define uint64_t unsigned long int
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
# define GL_UINT64_T
#elif defined _MSC_VER
# undef uint64_t
-# define uint64_t unsigned __int64
+typedef unsigned __int64 gl_uint64_t;
+# define uint64_t gl_uint64_t
# define GL_UINT64_T
#elif @HAVE_UNSIGNED_LONG_LONG_INT@
# undef uint64_t
-# define uint64_t unsigned long long int
+typedef unsigned long long int gl_uint64_t;
+# define uint64_t gl_uint64_t
# define GL_UINT64_T
#endif
@@ -216,12 +228,18 @@
#undef uint_fast32_t
#undef int_fast64_t
#undef uint_fast64_t
-#define int_fast8_t long int
-#define uint_fast8_t unsigned int_fast8_t
-#define int_fast16_t long int
-#define uint_fast16_t unsigned int_fast16_t
-#define int_fast32_t long int
-#define uint_fast32_t unsigned int_fast32_t
+typedef long int gl_int_fast8_t;
+typedef unsigned long int gl_uint_fast8_t;
+typedef long int gl_int_fast16_t;
+typedef unsigned long int gl_uint_fast16_t;
+typedef long int gl_int_fast32_t;
+typedef unsigned long int gl_uint_fast32_t;
+#define int_fast8_t gl_int_fast8_t
+#define uint_fast8_t gl_uint_fast8_t
+#define int_fast16_t gl_int_fast16_t
+#define uint_fast16_t gl_uint_fast16_t
+#define int_fast32_t gl_int_fast32_t
+#define uint_fast32_t gl_uint_fast32_t
#ifdef GL_INT64_T
# define int_fast64_t int64_t
#endif
@@ -233,8 +251,10 @@
#undef intptr_t
#undef uintptr_t
-#define intptr_t long int
-#define uintptr_t unsigned long int
+typedef long int gl_intptr_t;
+typedef unsigned long int gl_uintptr_t;
+#define intptr_t gl_intptr_t
+#define uintptr_t gl_uintptr_t
/* 7.18.1.5. Greatest-width integer types */
@@ -243,20 +263,24 @@
#undef intmax_t
#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define intmax_t long long int
+typedef long long int gl_intmax_t;
+# define intmax_t gl_intmax_t
#elif defined GL_INT64_T
# define intmax_t int64_t
#else
-# define intmax_t long int
+typedef long int gl_intmax_t;
+# define intmax_t gl_intmax_t
#endif
#undef uintmax_t
#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define uintmax_t unsigned long long int
+typedef unsigned long long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
#elif defined GL_UINT64_T
# define uintmax_t uint64_t
#else
-# define uintmax_t unsigned long int
+typedef unsigned long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
#endif
/* Verify that intmax_t and uintmax_t have the same size. Too much code
diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
index 1a0f241ce3..454078f795 100644
--- a/gl/sys_time.in.h
+++ b/gl/sys_time.in.h
@@ -39,6 +39,10 @@
# include <time.h>
# endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
# if ! @HAVE_STRUCT_TIMEVAL@
struct timeval
{
@@ -53,4 +57,8 @@ struct timeval
int gettimeofday (struct timeval *restrict, void *restrict);
# endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _GL_SYS_TIME_H */