diff options
author | Simon Josefsson <simon@josefsson.org> | 2010-04-13 10:23:03 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2010-04-13 10:23:03 +0200 |
commit | bd50a4d730e75804744f45308c4d4dfb40db042d (patch) | |
tree | f3cbc90a765c9567a0f32bf1cfceb8c6f4918717 /gl | |
parent | 253f4faa23195cc599bb06feafc1dccb4ed1a6b1 (diff) | |
download | libtasn1-bd50a4d730e75804744f45308c4d4dfb40db042d.tar.gz libtasn1-bd50a4d730e75804744f45308c4d4dfb40db042d.tar.bz2 libtasn1-bd50a4d730e75804744f45308c4d4dfb40db042d.zip |
Update gnulib files, fix new syntax-check warnings, add license.
Diffstat (limited to 'gl')
-rw-r--r-- | gl/Makefile.am | 4 | ||||
-rw-r--r-- | gl/m4/gnulib-common.m4 | 21 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 1 | ||||
-rw-r--r-- | gl/m4/stdlib_h.m4 | 3 | ||||
-rw-r--r-- | gl/m4/unistd_h.m4 | 5 | ||||
-rw-r--r-- | gl/stdlib.in.h | 7 | ||||
-rw-r--r-- | gl/unistd.in.h | 19 | ||||
-rw-r--r-- | gl/wchar.in.h | 6 |
8 files changed, 46 insertions, 20 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am index 5bc531d..e59d9cf 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -303,6 +303,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ + -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ @@ -395,6 +396,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ + -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ @@ -419,6 +421,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ @@ -426,7 +429,6 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index f8e32e3..54b2517 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 17 +# gnulib-common.m4 serial 19 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -48,7 +48,9 @@ AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1]) # a C preprocessor expression that will evaluate to 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], [ - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION + GNULIB_[]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION ]) # gl_MODULE_INDICATOR([modulename]) @@ -65,9 +67,12 @@ AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR], [ - AC_DEFINE_UNQUOTED([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), + AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [gl_MODULE_INDICATOR_CONDITION], - [Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module ]$1[ shall be considered present.]) + [Define to a C preprocessor expression that evaluates to 1 or 0, + depending whether the gnulib module $1 shall be considered present.]) ]) # gl_MODULE_INDICATOR_FOR_TESTS([modulename]) @@ -85,8 +90,10 @@ AC_DEFUN([gl_MODULE_INDICATOR], # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [ - AC_DEFINE([GNULIB_TEST_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], - [Define to 1 when the gnulib module ]$1[ should be tested.]) + AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], + [Define to 1 when the gnulib module $1 should be tested.]) ]) # m4_foreach_w @@ -125,6 +132,7 @@ m4_ifdef([AC_PROG_MKDIR_P], [ # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ # works. # This definition can be removed once autoconf >= 2.62 can be assumed. +m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no @@ -162,6 +170,7 @@ AC_DEFUN([AC_C_RESTRICT], *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ]) +]) # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 3e58ff0..db53902 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -71,6 +71,7 @@ AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) gl_cond_libtool=true + gl_m4_base='gl/m4' m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 index 4c5cca8..dd84796 100644 --- a/gl/m4/stdlib_h.m4 +++ b/gl/m4/stdlib_h.m4 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 27 +# stdlib_h.m4 serial 28 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -85,6 +85,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) + HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 index 789739d..8c2eec6 100644 --- a/gl/m4/unistd_h.m4 +++ b/gl/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 43 +# unistd_h.m4 serial 45 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -98,6 +98,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) + HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) @@ -122,6 +123,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) + HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) @@ -129,7 +131,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h index 3a87245..d74c251 100644 --- a/gl/stdlib.in.h +++ b/gl/stdlib.in.h @@ -67,10 +67,10 @@ struct random_data }; #endif -#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ +#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On MacOS X 10.3, only <unistd.h> declares mkstemp. */ /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */ -/* But avoid namespace pollution on glibc systems. */ +/* But avoid namespace pollution on glibc systems and native Windows. */ # include <unistd.h> #endif @@ -329,6 +329,9 @@ _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); # else +# if ! @HAVE_MKSTEMP@ +_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); # endif _GL_CXXALIASWARN (mkstemp); diff --git a/gl/unistd.in.h b/gl/unistd.in.h index 0c5c616..04d3a68 100644 --- a/gl/unistd.in.h +++ b/gl/unistd.in.h @@ -415,9 +415,8 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification <http://www.opengroup.org/susv3xsh/fchdir.html>. */ -# if @REPLACE_FCHDIR@ -_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/)); -_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/)); +# if ! @HAVE_FCHDIR@ +_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) @@ -426,9 +425,8 @@ _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); -# else -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); # endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); _GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir @@ -525,7 +523,9 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); # else -_GL_CXXALIAS_SYS (getcwd, char *, (char *buf, size_t size)); +/* Need to cast, because on mingw, the second parameter is + int size. */ +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); # endif _GL_CXXALIASWARN (getcwd); #elif defined GNULIB_POSIXCHECK @@ -773,7 +773,9 @@ getpagesize () /* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); # endif +# if @HAVE_DECL_GETPAGESIZE@ _GL_CXXALIASWARN (getpagesize); +# endif #elif defined GNULIB_POSIXCHECK # undef getpagesize # if HAVE_RAW_DECL_GETPAGESIZE @@ -1266,7 +1268,10 @@ _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); # else -_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +/* Need to cast, because on mingw, the third parameter is + unsigned int count + and the return type is 'int'. */ +_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif diff --git a/gl/wchar.in.h b/gl/wchar.in.h index 287204f..dd41d35 100644 --- a/gl/wchar.in.h +++ b/gl/wchar.in.h @@ -82,12 +82,16 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Define wint_t. (Also done in wctype.in.h.) */ +/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif +#else +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif #endif |