diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-12-01 11:07:34 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-12-01 11:07:34 +0100 |
commit | b9a248588b10c3f8c96e5bb7a41af9fa8962ed5f (patch) | |
tree | ca698944ee584059d6e176b031248c98be427a53 /gl | |
parent | 137d16ff9c763271b510bd73f5ebf7567891fce6 (diff) | |
download | libtasn1-b9a248588b10c3f8c96e5bb7a41af9fa8962ed5f.tar.gz |
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r-- | gl/Makefile.am | 2 | ||||
-rw-r--r-- | gl/m4/gnulib-cache.m4 | 3 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 1 | ||||
-rw-r--r-- | gl/m4/include_next.m4 | 52 | ||||
-rw-r--r-- | gl/m4/manywarnings.m4 | 94 | ||||
-rw-r--r-- | gl/m4/warnings.m4 | 88 | ||||
-rw-r--r-- | gl/stdint.in.h | 72 |
7 files changed, 188 insertions, 124 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am index ccd2580..9e09da9 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=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile pmccabe2html progname read-file stdint 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=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile manywarnings pmccabe2html progname read-file stdint version-etc-fsf warnings AUTOMAKE_OPTIONS = 1.5 gnits diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 89185b6..2073a3f 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=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile pmccabe2html progname read-file stdint 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=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile manywarnings pmccabe2html progname read-file stdint version-etc-fsf warnings # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([gl/override]) @@ -27,6 +27,7 @@ gl_MODULES([ gpl-3.0 lgpl-2.1 maintainer-makefile + manywarnings pmccabe2html progname read-file diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 403b309..58e824c 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -230,6 +230,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/include_next.m4 m4/longlong.m4 m4/malloc.m4 + m4/manywarnings.m4 m4/pmccabe2html.m4 m4/read-file.m4 m4/realloc.m4 diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 index c70c413..062753c 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/manywarnings.m4 b/gl/m4/manywarnings.m4 new file mode 100644 index 0000000..b0c413e --- /dev/null +++ b/gl/m4/manywarnings.m4 @@ -0,0 +1,94 @@ +# manywarnings.m4 serial 1 +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, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# gl_MANYWARN_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_MANYWARN_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 +]) + +# gl_MANYWARN_ALL_GCC(VARIABLE) +# ----------------------------- +# Add all documented GCC (currently as per version 4.3.2) warning +# parameters to variable VARIABLE. Note that you need to test them +# using gl_WARN_ADD if you want to make sure your gcc understands it. +AC_DEFUN([gl_MANYWARN_ALL_GCC], +[ + gl_manywarn_set= + for gl_manywarn_item 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 + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + $1=$gl_manywarn_set +]) diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4 index 3585c3e..c32cf4e 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 e246aa9..099a2cf 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 |