diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-09-26 22:52:55 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-09-26 22:52:55 +0200 |
commit | 828e4e35ea0634994eb27dc511799193068c9714 (patch) | |
tree | 80aba75fa530c768e267d36ada83ee617c96da2a /gnulib | |
parent | a92d03eeea8bea2c7943db9bff822168e65d5472 (diff) |
New upstream version 0.9.6
Diffstat (limited to 'gnulib')
49 files changed, 957 insertions, 212 deletions
diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in index c3fb3fdfb..dc060cc43 100644 --- a/gnulib/lib/Makefile.in +++ b/gnulib/lib/Makefile.in @@ -24,7 +24,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl accept areadlink base64 bind byteswap c-ctype c-strcase c-strcasestr calloc-posix canonicalize-lgpl chown close configmake connect count-one-bits crypto/md5 dirname-lgpl environ fclose fcntl-h ffs fnmatch func getaddrinfo getcwd-lgpl gethostname getpass getpeername getsockname gettext-h gettimeofday gitlog-to-changelog gnumakefile ignore-value inet_pton intprops ioctl listen maintainer-makefile manywarnings mkstemp mkstemps mktempd netdb nonblocking passfd perror physmem pipe-posix pipe2 poll posix-shell pthread pthread_sigmask random_r recv sched send setsockopt sigaction sigpipe snprintf socket stdarg stpcpy strchrnul strdup-posix strerror strerror_r-posix strndup strptime strsep strtok_r sys_stat sys_wait termios time_r timegm uname useless-if-before-free usleep vasprintf vc-list-files verify vsnprintf waitpid warnings +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl accept areadlink base64 bind byteswap c-ctype c-strcase c-strcasestr calloc-posix canonicalize-lgpl chown close configmake connect count-one-bits crypto/md5 dirname-lgpl environ fclose fcntl fcntl-h ffs fnmatch fsync func getaddrinfo getcwd-lgpl gethostname getpass getpeername getsockname gettext-h gettimeofday gitlog-to-changelog gnumakefile ignore-value inet_pton intprops ioctl largefile listen maintainer-makefile manywarnings mkstemp mkstemps mktempd netdb nonblocking passfd perror physmem pipe-posix pipe2 poll posix-shell pthread pthread_sigmask random_r recv sched send setsockopt sigaction sigpipe snprintf socket stdarg stpcpy strchrnul strdup-posix strerror strerror_r-posix strndup strptime strsep strtok_r sys_stat sys_wait termios time_r timegm uname useless-if-before-free usleep vasprintf vc-list-files verify vsnprintf waitpid warnings @@ -85,6 +85,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/freading.m4 \ $(top_srcdir)/gnulib/m4/fseek.m4 \ $(top_srcdir)/gnulib/m4/fseeko.m4 \ + $(top_srcdir)/gnulib/m4/fsync.m4 \ $(top_srcdir)/gnulib/m4/ftell.m4 \ $(top_srcdir)/gnulib/m4/ftello.m4 \ $(top_srcdir)/gnulib/m4/func.m4 \ @@ -109,6 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/intmax_t.m4 \ $(top_srcdir)/gnulib/m4/inttypes.m4 \ $(top_srcdir)/gnulib/m4/ioctl.m4 \ + $(top_srcdir)/gnulib/m4/largefile.m4 \ $(top_srcdir)/gnulib/m4/localcharset.m4 \ $(top_srcdir)/gnulib/m4/locale-fr.m4 \ $(top_srcdir)/gnulib/m4/locale-ja.m4 \ @@ -352,6 +354,7 @@ APPARMOR_CFLAGS = @APPARMOR_CFLAGS@ APPARMOR_LIBS = @APPARMOR_LIBS@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ +ARFLAGS = @ARFLAGS@ AS = @AS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUDIT_CFLAGS = @AUDIT_CFLAGS@ @@ -368,6 +371,8 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BLKID_CFLAGS = @BLKID_CFLAGS@ +BLKID_LIBS = @BLKID_LIBS@ BRCTL = @BRCTL@ BYTESWAP_H = @BYTESWAP_H@ CAPNG_CFLAGS = @CAPNG_CFLAGS@ @@ -986,6 +991,7 @@ LIBTOOL = @LIBTOOL@ LIBVIRT_MAJOR_VERSION = @LIBVIRT_MAJOR_VERSION@ LIBVIRT_MICRO_VERSION = @LIBVIRT_MICRO_VERSION@ LIBVIRT_MINOR_VERSION = @LIBVIRT_MINOR_VERSION@ +LIBVIRT_NODELETE = @LIBVIRT_NODELETE@ LIBVIRT_QEMU_SYMBOL_FILE = @LIBVIRT_QEMU_SYMBOL_FILE@ LIBVIRT_SYMBOL_FILE = @LIBVIRT_SYMBOL_FILE@ LIBVIRT_VERSION = @LIBVIRT_VERSION@ @@ -1023,6 +1029,7 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MINGW_EXTRA_LDFLAGS = @MINGW_EXTRA_LDFLAGS@ MKDIR_P = @MKDIR_P@ +MKFS = @MKFS@ MODPROBE = @MODPROBE@ MOUNT = @MOUNT@ MSCOM_LIBS = @MSCOM_LIBS@ @@ -1104,6 +1111,8 @@ NUMACTL_CFLAGS = @NUMACTL_CFLAGS@ NUMACTL_LIBS = @NUMACTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OPENWSMAN_CFLAGS = @OPENWSMAN_CFLAGS@ +OPENWSMAN_LIBS = @OPENWSMAN_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ @@ -1251,6 +1260,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ @@ -1412,11 +1422,11 @@ EXTRA_DIST = accept.c w32sock.h alignof.h alloca.c alloca.in.h \ dup2.c errno.in.h fclose.c fcntl.c fcntl.in.h fd-hook.h \ fflush.c stdio-impl.h ffs.c float.c float.in.h fnmatch.c \ fnmatch.in.h fnmatch_loop.c fpurge.c stdio-impl.h freading.h \ - stdio-impl.h fseek.c fseeko.c stdio-impl.h ftell.c ftello.c \ - stdio-impl.h gai_strerror.c getaddrinfo.c getcwd-lgpl.c \ - getdelim.c getdtablesize.c gethostname.c w32sock.h getline.c \ - getpass.c getpass.h getpeername.c w32sock.h getsockname.c \ - w32sock.h gettimeofday.c \ + stdio-impl.h fseek.c fseeko.c stdio-impl.h fsync.c ftell.c \ + ftello.c stdio-impl.h gai_strerror.c getaddrinfo.c \ + getcwd-lgpl.c getdelim.c getdtablesize.c gethostname.c \ + w32sock.h getline.c getpass.c getpass.h getpeername.c \ + w32sock.h getsockname.c w32sock.h gettimeofday.c \ $(top_srcdir)/build-aux/gitlog-to-changelog \ $(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/config.rpath \ ignore-value.h inet_ntop.c inet_pton.c intprops.h ioctl.c \ @@ -1517,8 +1527,8 @@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) @LTALLOCA@ EXTRA_libgnu_la_SOURCES = accept.c alloca.c bind.c calloc.c \ canonicalize-lgpl.c chown.c fchown-stub.c close.c connect.c \ dup2.c fclose.c fcntl.c fflush.c ffs.c float.c fnmatch.c \ - fnmatch_loop.c fpurge.c fseek.c fseeko.c ftell.c ftello.c \ - gai_strerror.c getaddrinfo.c getcwd-lgpl.c getdelim.c \ + fnmatch_loop.c fpurge.c fseek.c fseeko.c fsync.c ftell.c \ + ftello.c gai_strerror.c getaddrinfo.c getcwd-lgpl.c getdelim.c \ getdtablesize.c gethostname.c getline.c getpass.c \ getpeername.c getsockname.c gettimeofday.c inet_ntop.c \ inet_pton.c ioctl.c listen.c lseek.c lstat.c malloc.c \ @@ -1654,6 +1664,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freading.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseek.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gai_strerror.Plo@am__quote@ @@ -2177,12 +2188,8 @@ configmake.h: Makefile echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - if test -f $@ && cmp $@-t $@ > /dev/null; then \ - rm -f $@-t; \ - else \ - rm -f $@; mv $@-t $@; \ - fi + } | sed '/""/d' > $@-t + mv -f $@-t $@ # We need the following in order to create <errno.h> when the system # doesn't have one that is POSIX compliant. @@ -3403,6 +3410,7 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ + -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ diff --git a/gnulib/lib/base64.c b/gnulib/lib/base64.c index dc32d4738..739b5def7 100644 --- a/gnulib/lib/base64.c +++ b/gnulib/lib/base64.c @@ -21,7 +21,7 @@ * (mailbox/filter_trans.c, as of 2004-11-28). Improved by review * from Paul Eggert, Bruno Haible, and Stepan Kasal. * - * See also RFC 3548 <http://www.ietf.org/rfc/rfc3548.txt>. + * See also RFC 4648 <http://www.ietf.org/rfc/rfc4648.txt>. * * Be careful with error checking. Here is how you would typically * use these functions: @@ -554,10 +554,10 @@ base64_decode_alloc_ctx (struct base64_decode_context *ctx, { /* This may allocate a few bytes too many, depending on input, but it's not worth the extra CPU time to compute the exact size. - The exact size is 3 * inlen / 4, minus 1 if the input ends - with "=" and minus another 1 if the input ends with "==". + The exact size is 3 * (inlen + (ctx ? ctx->i : 0)) / 4, minus 1 if the + input ends with "=" and minus another 1 if the input ends with "==". Dividing before multiplying avoids the possibility of overflow. */ - size_t needlen = 3 * (inlen / 4) + 2; + size_t needlen = 3 * (inlen / 4) + 3; *out = malloc (needlen); if (!*out) diff --git a/gnulib/lib/canonicalize-lgpl.c b/gnulib/lib/canonicalize-lgpl.c index 80947e41f..b3dbf4f9e 100644 --- a/gnulib/lib/canonicalize-lgpl.c +++ b/gnulib/lib/canonicalize-lgpl.c @@ -127,7 +127,7 @@ __realpath (const char *name, char *resolved) #else path_max = pathconf (name, _PC_PATH_MAX); if (path_max <= 0) - path_max = 1024; + path_max = 8192; #endif if (resolved == NULL) diff --git a/gnulib/lib/errno.in.h b/gnulib/lib/errno.in.h index 26ad37ca0..8588f87bb 100644 --- a/gnulib/lib/errno.in.h +++ b/gnulib/lib/errno.in.h @@ -149,6 +149,16 @@ # define GNULIB_defined_ENOTSUP 1 # endif +# ifndef ENETRESET +# define ENETRESET 2011 +# define GNULIB_defined_ENETRESET 1 +# endif + +# ifndef ECONNABORTED +# define ECONNABORTED 2012 +# define GNULIB_defined_ECONNABORTED 1 +# endif + # ifndef ESTALE # define ESTALE 2009 # define GNULIB_defined_ESTALE 1 diff --git a/gnulib/lib/fflush.c b/gnulib/lib/fflush.c index e8f78a098..66003af62 100644 --- a/gnulib/lib/fflush.c +++ b/gnulib/lib/fflush.c @@ -62,7 +62,7 @@ clear_ungetc_buffer (FILE *fp) fp->_ungetc_count = 0; fp->_rcount = - fp->_rcount; } -# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ +# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ /* Nothing to do. */ # else /* other implementations */ fseeko (fp, 0, SEEK_CUR); diff --git a/gnulib/lib/fpurge.c b/gnulib/lib/fpurge.c index 857327cfd..c7dbd97fa 100644 --- a/gnulib/lib/fpurge.c +++ b/gnulib/lib/fpurge.c @@ -93,6 +93,11 @@ fpurge (FILE *fp) fp->_wcount = 0; fp->_ungetc_count = 0; return 0; +# elif defined __minix /* Minix */ + fp->_ptr = fp->_buf; + if (fp->_ptr != NULL) + fp->_count = 0; + return 0; # elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ fp->_ptr = fp->_base; if (fp->_ptr != NULL) diff --git a/gnulib/lib/freading.c b/gnulib/lib/freading.c index 6fb6b74df..13929b684 100644 --- a/gnulib/lib/freading.c +++ b/gnulib/lib/freading.c @@ -41,6 +41,8 @@ freading (FILE *fp) return (fp_->_flags & __SRD) != 0; # elif defined __EMX__ /* emx+gcc */ return (fp->_flags & _IOREAD) != 0; +# elif defined __minix /* Minix */ + return (fp->_flags & _IOREADING) != 0; # elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ # if defined __sun /* Solaris */ return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0; diff --git a/gnulib/lib/fseeko.c b/gnulib/lib/fseeko.c index d4a2639da..3d1622a41 100644 --- a/gnulib/lib/fseeko.c +++ b/gnulib/lib/fseeko.c @@ -71,6 +71,9 @@ fseeko (FILE *fp, off_t offset, int whence) && fp->_rcount == 0 && fp->_wcount == 0 && fp->_ungetc_count == 0) +#elif defined __minix /* Minix */ + if (fp_->_ptr == fp_->_buf + && (fp_->_ptr == NULL || fp_->_count == 0)) #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ if (fp_->_ptr == fp_->_base && (fp_->_ptr == NULL || fp_->_cnt == 0)) @@ -92,14 +95,10 @@ fseeko (FILE *fp, off_t offset, int whence) #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib." #endif { - /* We get here when an fflush() call immediately preceded this one. We - know there are no buffers. - POSIX requires us to modify the file descriptor's position. - But we cannot position beyond end of file here. */ - off_t pos = - lseek (fileno (fp), - whence == SEEK_END && offset > 0 ? 0 : offset, - whence); + /* We get here when an fflush() call immediately preceded this one (or + if ftell() has created buffers but no I/O has occurred on a + newly-opened stream). We know there are no buffers. */ + off_t pos = lseek (fileno (fp), offset, whence); if (pos == -1) { #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ @@ -110,6 +109,7 @@ fseeko (FILE *fp, off_t offset, int whence) #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_flags &= ~_IO_EOF_SEEN; + fp->_offset = pos; #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __CYGWIN__ /* fp_->_offset is typed as an integer. */ @@ -139,10 +139,7 @@ fseeko (FILE *fp, off_t offset, int whence) fp->__offset = pos; fp->__eof = 0; #endif - /* If we were not requested to position beyond end of file, we're - done. */ - if (!(whence == SEEK_END && offset > 0)) - return 0; + return 0; } return fseeko (fp, offset, whence); } diff --git a/gnulib/lib/fsync.c b/gnulib/lib/fsync.c new file mode 100644 index 000000000..9311c85d5 --- /dev/null +++ b/gnulib/lib/fsync.c @@ -0,0 +1,80 @@ +/* -*- buffer-read-only: t -*- vi: set ro: */ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Emulate fsync on platforms that lack it, primarily Windows and + cross-compilers like MinGW. + + This is derived from sqlite3 sources. + http://www.sqlite.org/cvstrac/rlog?f=sqlite/src/os_win.c + http://www.sqlite.org/copyright.html + + Written by Richard W.M. Jones <rjones.at.redhat.com> + + Copyright (C) 2008-2011 Free Software Foundation, Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> +#include <unistd.h> + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +/* _get_osfhandle */ +# include <io.h> + +/* FlushFileBuffers */ +# define WIN32_LEAN_AND_MEAN +# include <windows.h> + +# include <errno.h> + +int +fsync (int fd) +{ + HANDLE h = (HANDLE) _get_osfhandle (fd); + DWORD err; + + if (h == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return -1; + } + + if (!FlushFileBuffers (h)) + { + /* Translate some Windows errors into rough approximations of Unix + * errors. MSDN is useless as usual - in this case it doesn't + * document the full range of errors. + */ + err = GetLastError (); + switch (err) + { + /* eg. Trying to fsync a tty. */ + case ERROR_INVALID_HANDLE: + errno = EINVAL; + break; + + default: + errno = EIO; + } + return -1; + } + + return 0; +} + +#else /* !Windows */ + +# error "This platform lacks fsync function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib." + +#endif /* !Windows */ diff --git a/gnulib/lib/gnulib.mk b/gnulib/lib/gnulib.mk index 0f150ad88..560b51d45 100644 --- a/gnulib/lib/gnulib.mk +++ b/gnulib/lib/gnulib.mk @@ -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 --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl accept areadlink base64 bind byteswap c-ctype c-strcase c-strcasestr calloc-posix canonicalize-lgpl chown close configmake connect count-one-bits crypto/md5 dirname-lgpl environ fclose fcntl-h ffs fnmatch func getaddrinfo getcwd-lgpl gethostname getpass getpeername getsockname gettext-h gettimeofday gitlog-to-changelog gnumakefile ignore-value inet_pton intprops ioctl listen maintainer-makefile manywarnings mkstemp mkstemps mktempd netdb nonblocking passfd perror physmem pipe-posix pipe2 poll posix-shell pthread pthread_sigmask random_r recv sched send setsockopt sigaction sigpipe snprintf socket stdarg stpcpy strchrnul strdup-posix strerror strerror_r-posix strndup strptime strsep strtok_r sys_stat sys_wait termios time_r timegm uname useless-if-before-free usleep vasprintf vc-list-files verify vsnprintf waitpid warnings +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl accept areadlink base64 bind byteswap c-ctype c-strcase c-strcasestr calloc-posix canonicalize-lgpl chown close configmake connect count-one-bits crypto/md5 dirname-lgpl environ fclose fcntl fcntl-h ffs fnmatch fsync func getaddrinfo getcwd-lgpl gethostname getpass getpeername getsockname gettext-h gettimeofday gitlog-to-changelog gnumakefile ignore-value inet_pton intprops ioctl largefile listen maintainer-makefile manywarnings mkstemp mkstemps mktempd netdb nonblocking passfd perror physmem pipe-posix pipe2 poll posix-shell pthread pthread_sigmask random_r recv sched send setsockopt sigaction sigpipe snprintf socket stdarg stpcpy strchrnul strdup-posix strerror strerror_r-posix strndup strptime strsep strtok_r sys_stat sys_wait termios time_r timegm uname useless-if-before-free usleep vasprintf vc-list-files verify vsnprintf waitpid warnings AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects @@ -301,12 +301,8 @@ configmake.h: Makefile echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - if test -f $@ && cmp $@-t $@ > /dev/null; then \ - rm -f $@-t; \ - else \ - rm -f $@; mv $@-t $@; \ - fi + } | sed '/""/d' > $@-t + mv -f $@-t $@ BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t @@ -565,6 +561,15 @@ EXTRA_libgnu_la_SOURCES += fseeko.c ## end gnulib module fseeko +## begin gnulib module fsync + + +EXTRA_DIST += fsync.c + +EXTRA_libgnu_la_SOURCES += fsync.c + +## end gnulib module fsync + ## begin gnulib module ftell @@ -2824,6 +2829,7 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ + -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ diff --git a/gnulib/lib/lstat.c b/gnulib/lib/lstat.c index 0aee6a9a1..5f51d33fd 100644 --- a/gnulib/lib/lstat.c +++ b/gnulib/lib/lstat.c @@ -19,6 +19,10 @@ /* written by Jim Meyering */ +/* If the user's config.h happens to include <sys/stat.h>, let it include only + the system's <sys/stat.h> here, so that orig_lstat doesn't recurse to + rpl_lstat. */ +#define __need_system_sys_stat_h #include <config.h> #if !HAVE_LSTAT @@ -29,7 +33,6 @@ typedef int dummy; #else /* HAVE_LSTAT */ /* Get the original definition of lstat. It might be defined as a macro. */ -# define __need_system_sys_stat_h # include <sys/types.h> # include <sys/stat.h> # undef __need_system_sys_stat_h @@ -41,7 +44,10 @@ orig_lstat (const char *filename, struct stat *buf) } /* Specification. */ -# include <sys/stat.h> +/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include <sys/stat.h> + above. */ +# include "sys/stat.h" # include <string.h> # include <errno.h> diff --git a/gnulib/lib/open.c b/gnulib/lib/open.c index 9d558c503..8367d3d9b 100644 --- a/gnulib/lib/open.c +++ b/gnulib/lib/open.c @@ -18,13 +18,16 @@ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ +/* If the user's config.h happens to include <fcntl.h>, let it include only + the system's <fcntl.h> here, so that orig_open doesn't recurse to + rpl_open. */ +#define __need_system_fcntl_h #include <config.h> /* Get the original definition of open. It might be defined as a macro. */ -#define __need_system_fcntl_h #include <fcntl.h> -#undef __need_system_fcntl_h #include <sys/types.h> +#undef __need_system_fcntl_h static inline int orig_open (const char *filename, int flags, mode_t mode) @@ -33,7 +36,9 @@ orig_open (const char *filename, int flags, mode_t mode) } /* Specification. */ -#include <fcntl.h> +/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include <fcntl.h> above. */ +#include "fcntl.h" #include <errno.h> #include <stdarg.h> diff --git a/gnulib/lib/pathmax.h b/gnulib/lib/pathmax.h index 377319961..7a7696f22 100644 --- a/gnulib/lib/pathmax.h +++ b/gnulib/lib/pathmax.h @@ -25,7 +25,22 @@ including the terminating NUL byte. <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html> PATH_MAX is not defined on systems which have no limit on filename length, - such as GNU/Hurd. */ + such as GNU/Hurd. + + This file does *not* define PATH_MAX always. Programs that use this file + can handle the GNU/Hurd case in several ways: + - Either with a package-wide handling, or with a per-file handling, + - Either through a + #ifdef PATH_MAX + or through a fallback like + #ifndef PATH_MAX + # define PATH_MAX 8192 + #endif + or through a fallback like + #ifndef PATH_MAX + # define PATH_MAX pathconf ("/", _PC_PATH_MAX) + #endif + */ # include <unistd.h> @@ -35,11 +50,6 @@ # define _POSIX_PATH_MAX 256 # endif -# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF -# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \ - : pathconf ("/", _PC_PATH_MAX)) -# endif - /* Don't include sys/param.h if it already has been. */ # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include <sys/param.h> @@ -49,10 +59,6 @@ # define PATH_MAX MAXPATHLEN # endif -# ifndef PATH_MAX -# define PATH_MAX _POSIX_PATH_MAX -# endif - # ifdef __hpux /* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename, *not* including the terminating NUL byte, and is set to 1023. diff --git a/gnulib/lib/pipe2.c b/gnulib/lib/pipe2.c index 09cbf2c4f..bbacd7ece 100644 --- a/gnulib/lib/pipe2.c +++ b/gnulib/lib/pipe2.c @@ -153,6 +153,8 @@ pipe2 (int fd[2], int flags) #endif +#if GNULIB_defined_O_NONBLOCK || \ + !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) fail: { int saved_errno = errno; @@ -163,4 +165,5 @@ pipe2 (int fd[2], int flags) errno = saved_errno; return -1; } +#endif } diff --git a/gnulib/lib/stat.c b/gnulib/lib/stat.c index 2f5ebf647..493f4503d 100644 --- a/gnulib/lib/stat.c +++ b/gnulib/lib/stat.c @@ -18,10 +18,13 @@ /* written by Eric Blake */ +/* If the user's config.h happens to include <sys/stat.h>, let it include only + the system's <sys/stat.h> here, so that orig_stat doesn't recurse to + rpl_stat. */ +#define __need_system_sys_stat_h #include <config.h> /* Get the original definition of stat. It might be defined as a macro. */ -#define __need_system_sys_stat_h #include <sys/types.h> #include <sys/stat.h> #undef __need_system_sys_stat_h @@ -33,7 +36,10 @@ orig_stat (const char *filename, struct stat *buf) } /* Specification. */ -#include <sys/stat.h> +/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include <sys/stat.h> + above. */ +#include "sys/stat.h" #include <errno.h> #include <limits.h> diff --git a/gnulib/lib/strerror-override.c b/gnulib/lib/strerror-override.c index 05d2f9c6e..7bf380fed 100644 --- a/gnulib/lib/strerror-override.c +++ b/gnulib/lib/strerror-override.c @@ -250,6 +250,16 @@ strerror_override (int errnum) return "Not supported"; #endif +#if GNULIB_defined_ENETRESET + case ENETRESET: + return "Network dropped connection on reset"; +#endif + +#if GNULIB_defined_ECONNABORTED + case ECONNABORTED: + return "Software caused connection abort"; +#endif + #if GNULIB_defined_ESTALE case ESTALE: return "Stale NFS file handle"; diff --git a/gnulib/lib/strerror-override.h b/gnulib/lib/strerror-override.h index 2d7f7efd7..c7b71677e 100644 --- a/gnulib/lib/strerror-override.h +++ b/gnulib/lib/strerror-override.h @@ -41,6 +41,8 @@ || GNULIB_defined_EBADMSG \ || GNULIB_defined_EOVERFLOW \ || GNULIB_defined_ENOTSUP \ + || GNULIB_defined_ENETRESET \ + || GNULIB_defined_ECONNABORTED \ || GNULIB_defined_ESTALE \ || GNULIB_defined_EDQUOT \ || GNULIB_defined_ECANCELED diff --git a/gnulib/lib/strings.in.h b/gnulib/lib/strings.in.h index 8bdb5e63e..0cc27ffa7 100644 --- a/gnulib/lib/strings.in.h +++ b/gnulib/lib/strings.in.h @@ -25,6 +25,12 @@ #endif @PRAGMA_COLUMNS@ +/* Minix 3.1.8 has a bug: <sys/types.h> must be included before <strings.h>. + But avoid namespace pollution on glibc systems. */ +#if defined __minix && !defined __GLIBC__ +# include <sys/types.h> +#endif + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRINGS_H@ diff --git a/gnulib/lib/sys_select.in.h b/gnulib/lib/sys_select.in.h index c446faed1..5a8473f1b 100644 --- a/gnulib/lib/sys_select.in.h +++ b/gnulib/lib/sys_select.in.h @@ -34,6 +34,16 @@ # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ +/* On IRIX 6.5, <sys/timespec.h> includes <sys/types.h>, which includes + <sys/bsd_types.h>, which includes <sys/select.h>. At this point we cannot + include <signal.h>, because that includes <internal/signal_core.h>, which + gives a syntax error because <sys/timespec.h> has not been completely + processed. Simply delegate to the system's header in this case. */ +#elif @HAVE_SYS_SELECT_H@ && defined __sgi && (defined _SYS_BSD_TYPES_H && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H) + +# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + #else #ifndef _@GUARD_PREFIX@_SYS_SELECT_H diff --git a/gnulib/lib/sys_utsname.in.h b/gnulib/lib/sys_utsname.in.h index c6c8bb02d..69065f455 100644 --- a/gnulib/lib/sys_utsname.in.h +++ b/gnulib/lib/sys_utsname.in.h @@ -25,7 +25,15 @@ @PRAGMA_COLUMNS@ #if @HAVE_SYS_UTSNAME_H@ + +/* Minix 3.1.8 has a bug: <stddef.h> must be included before <sys/utsname.h>. + But avoid namespace pollution on glibc systems. */ +# if defined __minix && !defined __GLIBC__ +# include <stddef.h> +# endif + # @INCLUDE_NEXT@ @NEXT_SYS_UTSNAME_H@ + #endif #define _@GUARD_PREFIX@_SYS_UTSNAME_H diff --git a/gnulib/lib/unistd.in.h b/gnulib/lib/unistd.in.h index 115a83bac..9e137b206 100644 --- a/gnulib/lib/unistd.in.h +++ b/gnulib/lib/unistd.in.h @@ -87,7 +87,8 @@ /* mingw declares getcwd in <io.h>, not in <unistd.h>. */ #if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -# include <io.h> +# include <io.h> /* mingw32, mingw64 */ +# include <direct.h> /* mingw64 */ #endif /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. diff --git a/gnulib/lib/wctype.in.h b/gnulib/lib/wctype.in.h index 59e1a5e16..710e407df 100644 --- a/gnulib/lib/wctype.in.h +++ b/gnulib/lib/wctype.in.h @@ -130,6 +130,10 @@ # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit +# endif +# endif +# if @REPLACE_TOWLOWER@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # define towupper rpl_towupper # endif @@ -273,7 +277,7 @@ iswxdigit } static inline wint_t -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_TOWLOWER@ rpl_towlower # else towlower @@ -284,7 +288,7 @@ towlower } static inline wint_t -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_TOWLOWER@ rpl_towupper # else towupper @@ -431,7 +435,7 @@ _GL_WARN_ON_USE (iswctype, "iswctype is unportable - " # endif #endif -#if @REPLACE_ISWCNTRL@ || defined __MINGW32__ +#if @REPLACE_TOWLOWER@ || defined __MINGW32__ _GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); #else diff --git a/gnulib/m4/errno_h.m4 b/gnulib/m4/errno_h.m4 index e949dc75b..93ac2068b 100644 --- a/gnulib/m4/errno_h.m4 +++ b/gnulib/m4/errno_h.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# errno_h.m4 serial 9 +# errno_h.m4 serial 10 dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -36,6 +36,12 @@ booboo #if !defined ENOTSUP booboo #endif +#if !defined ENETRESET +booboo +#endif +#if !defined ECONNABORTED +booboo +#endif #if !defined ESTALE booboo #endif diff --git a/gnulib/m4/fsync.m4 b/gnulib/m4/fsync.m4 new file mode 100644 index 000000000..b87e7e102 --- /dev/null +++ b/gnulib/m4/fsync.m4 @@ -0,0 +1,19 @@ +# -*- buffer-read-only: t -*- vi: set ro: +# DO NOT EDIT! GENERATED AUTOMATICALLY! +# fsync.m4 serial 2 +dnl Copyright (C) 2008-2011 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. + +AC_DEFUN([gl_FUNC_FSYNC], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([fsync]) + if test $ac_cv_func_fsync = no; then + HAVE_FSYNC=0 + fi +]) + +# Prerequisites of lib/fsync.c. +AC_DEFUN([gl_PREREQ_FSYNC], [:]) diff --git a/gnulib/m4/getaddrinfo.m4 b/gnulib/m4/getaddrinfo.m4 index f5666dfc2..a8caf6523 100644 --- a/gnulib/m4/getaddrinfo.m4 +++ b/gnulib/m4/getaddrinfo.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# getaddrinfo.m4 serial 27 +# getaddrinfo.m4 serial 28 dnl Copyright (C) 2004-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -65,7 +65,7 @@ AC_DEFUN([gl_GETADDRINFO], # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an # inline function declared in ws2tcpip.h, so we need to get that # header included somehow. - AC_CHECK_DECLS([gai_strerror, gai_strerrorA], [], [break], [[ + AC_CHECK_DECLS([gai_strerror], [], [], [[ #include <sys/types.h> #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> @@ -79,6 +79,19 @@ AC_DEFUN([gl_GETADDRINFO], #include <stddef.h> ]]) if test $ac_cv_have_decl_gai_strerror = yes; then + AC_CHECK_DECLS([gai_strerrorA], [], [], [[ +#include <sys/types.h> +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif +#ifdef HAVE_WS2TCPIP_H +#include <ws2tcpip.h> +#endif +#include <stddef.h> +]]) dnl check for correct signature AC_CACHE_CHECK([for gai_strerror with POSIX signature], [gl_cv_func_gai_strerror_posix_signature], [ diff --git a/gnulib/m4/getcwd.m4 b/gnulib/m4/getcwd.m4 index e49dac689..4504a763e 100644 --- a/gnulib/m4/getcwd.m4 +++ b/gnulib/m4/getcwd.m4 @@ -8,7 +8,7 @@ # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. -# serial 7 +# serial 8 AC_DEFUN([gl_FUNC_GETCWD_NULL], [ @@ -39,9 +39,6 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], return 0; } #endif - /* If size is non-zero, allocation must fail if size is too small */ - if (getcwd (NULL, 1)) - return 5; ]])], [gl_cv_func_getcwd_null=yes], [gl_cv_func_getcwd_null=no], @@ -57,6 +54,24 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], ]])]) ]) +AC_DEFUN([gl_FUNC_GETCWD_SIGNATURE], +[ + AC_CACHE_CHECK([for getcwd with POSIX signature], + [gl_cv_func_getcwd_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <unistd.h>]], + [[extern + #ifdef __cplusplus + "C" + #endif + char *getcwd (char *, size_t); + ]]) + ], + [gl_cv_func_getcwd_posix_signature=yes], + [gl_cv_func_getcwd_posix_signature=no]) + ]) +]) dnl Guarantee that getcwd will malloc with a NULL first argument. Assumes dnl that either the system getcwd is robust, or that calling code is okay @@ -69,9 +84,10 @@ AC_DEFUN([gl_FUNC_GETCWD_LGPL], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_GETCWD_NULL]) + AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE]) - case $gl_cv_func_getcwd_null in - *yes) ;; + case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in + *yes,yes) ;; *) dnl Minimal replacement lib/getcwd-lgpl.c. REPLACE_GETCWD=1 @@ -85,6 +101,7 @@ AC_DEFUN([gl_FUNC_GETCWD], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_GETCWD_NULL]) + AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles gl_abort_bug=no @@ -96,8 +113,8 @@ AC_DEFUN([gl_FUNC_GETCWD], gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);; esac - case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in - *yes,yes,no) ;; + case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature$gl_cv_func_getcwd_path_max,$gl_abort_bug in + *yes,yes,yes,no) ;; *) dnl Full replacement lib/getcwd.c, overrides LGPL replacement. REPLACE_GETCWD=1;; diff --git a/gnulib/m4/gnulib-common.m4 b/gnulib/m4/gnulib-common.m4 index c3c327a47..046cfeace 100644 --- a/gnulib/m4/gnulib-common.m4 +++ b/gnulib/m4/gnulib-common.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# gnulib-common.m4 serial 28 +# gnulib-common.m4 serial 30 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -213,6 +213,60 @@ m4_ifndef([AS_VAR_IF], [m4_define([AS_VAR_IF], [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) +# gl_PROG_AR_RANLIB +# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. +# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override +# the values. +AC_DEFUN([gl_PROG_AR_RANLIB], +[ + dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler + dnl as "cc", and GCC as "gcc". They have different object file formats and + dnl library formats. In particular, the GNU binutils programs ar, ranlib + dnl produce libraries that work only with gcc, not with cc. + AC_REQUIRE([AC_PROG_CC]) + AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], + [ + AC_EGREP_CPP([Amsterdam], + [ +#ifdef __ACK__ +Amsterdam +#endif + ], + [gl_cv_c_amsterdam_compiler=yes], + [gl_cv_c_amsterdam_compiler=no]) + ]) + if test -z "$AR"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + AR='cc -c.a' + if test -z "$ARFLAGS"; then + ARFLAGS='-o' + fi + else + dnl Use the Automake-documented default values for AR and ARFLAGS, + dnl but prefer ${host}-ar over ar (useful for cross-compiling). + AC_CHECK_TOOL([AR], [ar], [ar]) + if test -z "$ARFLAGS"; then + ARFLAGS='cru' + fi + fi + else + if test -z "$ARFLAGS"; then + ARFLAGS='cru' + fi + fi + AC_SUBST([AR]) + AC_SUBST([ARFLAGS]) + if test -z "$RANLIB"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + RANLIB=':' + else + dnl Use the ranlib program if it is available. + AC_PROG_RANLIB + fi + fi + AC_SUBST([RANLIB]) +]) + # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix # for interoperability with automake-1.9.6 from autoconf-2.62. diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 index 67b86ff6c..ece9a7884 100644 --- a/gnulib/m4/gnulib-comp.m4 +++ b/gnulib/m4/gnulib-comp.m4 @@ -27,7 +27,7 @@ AC_DEFUN([gl_EARLY], m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable - AC_REQUIRE([AC_PROG_RANLIB]) + AC_REQUIRE([gl_PROG_AR_RANLIB]) AC_REQUIRE([AM_PROG_CC_C_O]) # Code from module accept: # Code from module alignof: @@ -112,6 +112,8 @@ AC_DEFUN([gl_EARLY], # Code from module fseeko: AC_REQUIRE([AC_FUNC_FSEEKO]) # Code from module fseeko-tests: + # Code from module fsync: + # Code from module fsync-tests: # Code from module ftell: # Code from module ftell-tests: # Code from module ftello: @@ -161,6 +163,7 @@ AC_DEFUN([gl_EARLY], # Code from module inttypes-tests: # Code from module ioctl: # Code from module largefile: + AC_REQUIRE([AC_SYS_LARGEFILE]) # Code from module listen: # Code from module localcharset: # Code from module locale: @@ -208,6 +211,7 @@ AC_DEFUN([gl_EARLY], # Code from module passfd: # Code from module passfd-tests: # Code from module pathmax: + # Code from module pathmax-tests: # Code from module perror: # Code from module perror-tests: # Code from module physmem: @@ -520,6 +524,12 @@ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then AC_LIBOBJ([fseeko]) fi gl_STDIO_MODULE_INDICATOR([fseeko]) +gl_FUNC_FSYNC +if test $HAVE_FSYNC = 0; then + AC_LIBOBJ([fsync]) + gl_PREREQ_FSYNC +fi +gl_UNISTD_MODULE_INDICATOR([fsync]) gl_FUNC_FTELL if test $REPLACE_FTELL = 1; then AC_LIBOBJ([ftell]) @@ -1414,6 +1424,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/freading.h lib/fseek.c lib/fseeko.c + lib/fsync.c lib/ftell.c lib/ftello.c lib/gai_strerror.c @@ -1595,6 +1606,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/freading.m4 m4/fseek.m4 m4/fseeko.m4 + m4/fsync.m4 m4/ftell.m4 m4/ftello.m4 m4/func.m4 @@ -1807,6 +1819,9 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-fseeko.c tests/test-fseeko.sh tests/test-fseeko2.sh + tests/test-fseeko3.c + tests/test-fseeko3.sh + tests/test-fsync.c tests/test-ftell.c tests/test-ftell.sh tests/test-ftell2.sh @@ -1874,6 +1889,7 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-open.c tests/test-open.h tests/test-passfd.c + tests/test-pathmax.c tests/test-perror.c tests/test-perror.sh tests/test-perror2.c diff --git a/gnulib/m4/largefile.m4 b/gnulib/m4/largefile.m4 new file mode 100644 index 000000000..5cefc5da8 --- /dev/null +++ b/gnulib/m4/largefile.m4 @@ -0,0 +1,106 @@ +# -*- buffer-read-only: t -*- vi: set ro: +# DO NOT EDIT! GENERATED AUTOMATICALLY! +# Enable large files on systems where this is not the default. + +# Copyright 1992-1996, 1998-2011 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# The following implementation works around a problem in autoconf <= 2.68; +# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5. +m4_version_prereq([2.69], [] ,[ + +# _AC_SYS_LARGEFILE_TEST_INCLUDES +# ------------------------------- +m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], +[@%:@include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]];[]dnl +]) + + +# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, +# CACHE-VAR, +# DESCRIPTION, +# PROLOGUE, [FUNCTION-BODY]) +# -------------------------------------------------------- +m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], +[AC_CACHE_CHECK([for $1 value needed for large files], [$3], +[while :; do + m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( + [AC_LANG_PROGRAM([$5], [$6])], + [$3=no; break]) + m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( + [AC_LANG_PROGRAM([@%:@define $1 $2 +$5], [$6])], + [$3=$2; break]) + $3=unknown + break +done]) +case $$3 in #( + no | unknown) ;; + *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);; +esac +rm -rf conftest*[]dnl +])# _AC_SYS_LARGEFILE_MACRO_VALUE + + +# AC_SYS_LARGEFILE +# ---------------- +# By default, many hosts won't let programs access large files; +# one must use special compiler options to get large-file access to work. +# For more details about this brain damage please see: +# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html +AC_DEFUN([AC_SYS_LARGEFILE], +[AC_ARG_ENABLE(largefile, + [ --disable-largefile omit support for large files]) +if test "$enable_largefile" != no; then + + AC_CACHE_CHECK([for special C compiler options needed for large files], + ac_cv_sys_largefile_CC, + [ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) + AC_COMPILE_IFELSE([], [break]) + CC="$CC -n32" + AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi]) + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, + ac_cv_sys_file_offset_bits, + [Number of bits in a file offset, on hosts where this is settable.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES]) + if test $ac_cv_sys_file_offset_bits = unknown; then + _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, + ac_cv_sys_large_files, + [Define for large files, on AIX-style hosts.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES]) + fi + + AH_VERBATIM([_DARWIN_USE_64_BIT_INODE], +[/* Enable large inode numbers on Mac OS X. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif]) +fi +])# AC_SYS_LARGEFILE + +])# m4_version_prereq 2.69 diff --git a/gnulib/m4/mbrtowc.m4 b/gnulib/m4/mbrtowc.m4 index 40294f9c9..f7062aa31 100644 --- a/gnulib/m4/mbrtowc.m4 +++ b/gnulib/m4/mbrtowc.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# mbrtowc.m4 serial 24 +# mbrtowc.m4 serial 25 dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -17,6 +17,22 @@ AC_DEFUN([gl_FUNC_MBRTOWC], AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 + AC_CHECK_DECLS([mbrtowc],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before + <wchar.h>. + BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be + included before <wchar.h>. */ +#include <stddef.h> +#include <stdio.h> +#include <time.h> +#include <wchar.h> +]]) + if test $ac_cv_have_decl_mbrtowc = yes; then + dnl On Minix 3.1.8, the system's <wchar.h> declares mbrtowc() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_MBRTOWC=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 diff --git a/gnulib/m4/mbsinit.m4 b/gnulib/m4/mbsinit.m4 index 89df7e8ee..7a0b95e01 100644 --- a/gnulib/m4/mbsinit.m4 +++ b/gnulib/m4/mbsinit.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# mbsinit.m4 serial 7 +# mbsinit.m4 serial 8 dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -17,6 +17,22 @@ AC_DEFUN([gl_FUNC_MBSINIT], AC_CHECK_FUNCS_ONCE([mbsinit]) if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 + AC_CHECK_DECLS([mbsinit],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before + <wchar.h>. + BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be + included before <wchar.h>. */ +#include <stddef.h> +#include <stdio.h> +#include <time.h> +#include <wchar.h> +]]) + if test $ac_cv_have_decl_mbsinit = yes; then + dnl On Minix 3.1.8, the system's <wchar.h> declares mbsinit() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_MBSINIT=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 diff --git a/gnulib/m4/mbsrtowcs.m4 b/gnulib/m4/mbsrtowcs.m4 index 1455fdc13..2dccbcb16 100644 --- a/gnulib/m4/mbsrtowcs.m4 +++ b/gnulib/m4/mbsrtowcs.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# mbsrtowcs.m4 serial 12 +# mbsrtowcs.m4 serial 13 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -16,6 +16,22 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS], AC_CHECK_FUNCS_ONCE([mbsrtowcs]) if test $ac_cv_func_mbsrtowcs = no; then HAVE_MBSRTOWCS=0 + AC_CHECK_DECLS([mbsrtowcs],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before + <wchar.h>. + BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be + included before <wchar.h>. */ +#include <stddef.h> +#include <stdio.h> +#include <time.h> +#include <wchar.h> +]]) + if test $ac_cv_have_decl_mbsrtowcs = yes; then + dnl On Minix 3.1.8, the system's <wchar.h> declares mbsrtowcs() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_MBSRTOWCS=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSRTOWCS=1 diff --git a/gnulib/m4/pathmax.m4 b/gnulib/m4/pathmax.m4 index 0c5aa099d..aac68bb0f 100644 --- a/gnulib/m4/pathmax.m4 +++ b/gnulib/m4/pathmax.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# pathmax.m4 serial 8 +# pathmax.m4 serial 9 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -10,6 +10,5 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_PATHMAX], [ dnl Prerequisites of lib/pathmax.h. - AC_CHECK_FUNCS_ONCE([pathconf]) AC_CHECK_HEADERS_ONCE([sys/param.h]) ]) diff --git a/gnulib/m4/pthread.m4 b/gnulib/m4/pthread.m4 index 911c19982..e43e3b11b 100644 --- a/gnulib/m4/pthread.m4 +++ b/gnulib/m4/pthread.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# pthread.m4 +# pthread.m4 serial 3 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -40,12 +40,31 @@ AC_DEFUN([gl_PTHREAD_CHECK], LIB_PTHREAD= if test $ac_cv_header_pthread_h = yes; then - gl_saved_libs=$LIBS - AC_SEARCH_LIBS([pthread_create], [pthread], - [if test "$ac_cv_search_pthread_create" != "none required"; then - LIB_PTHREAD="$ac_cv_search_pthread_create" - fi]) - LIBS="$gl_saved_libs" + dnl We cannot use AC_SEARCH_LIBS here, because on OSF/1 5.1 pthread_join + dnl is defined as a macro which expands to __phread_join, and libpthread + dnl contains a definition for __phread_join but none for pthread_join. + AC_CACHE_CHECK([for library containing pthread_join], + [gl_cv_search_pthread_join], + [gl_saved_libs="$LIBS" + gl_cv_search_pthread_join= + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <pthread.h>]], + [[pthread_join (pthread_self (), (void **) 0);]])], + [gl_cv_search_pthread_join="none required"]) + if test -z "$gl_cv_search_pthread_join"; then + LIBS="-lpthread $gl_saved_libs" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <pthread.h>]], + [[pthread_join (pthread_self (), (void **) 0);]])], + [gl_cv_search_pthread_join="-lpthread"]) + fi + LIBS="$gl_saved_libs" + ]) + if test "$gl_cv_search_pthread_join" != "none required"; then + LIB_PTHREAD="$gl_cv_search_pthread_join" + fi fi AC_SUBST([LIB_PTHREAD]) diff --git a/gnulib/m4/pthread_sigmask.m4 b/gnulib/m4/pthread_sigmask.m4 index a0fcaaf9e..48dbdbf49 100644 --- a/gnulib/m4/pthread_sigmask.m4 +++ b/gnulib/m4/pthread_sigmask.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# pthread_sigmask.m4 serial 11 +# pthread_sigmask.m4 serial 12 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -15,8 +15,8 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], dnl Some packages like Emacs use --avoid=threadlib. dnl Write the symbol in such a way that it does not cause 'aclocal' to pick dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/. - m4_ifdef([gl_[]THREADLIB], [ - AC_REQUIRE([gl_[]THREADLIB]) + m4_ifdef([gl_][THREADLIB], [ + AC_REQUIRE([gl_][THREADLIB]) if test "$gl_threads_api" = posix; then if test $ac_cv_func_pthread_sigmask = yes; then diff --git a/gnulib/m4/strings_h.m4 b/gnulib/m4/strings_h.m4 index eb685314c..e414ee1df 100644 --- a/gnulib/m4/strings_h.m4 +++ b/gnulib/m4/strings_h.m4 @@ -1,7 +1,7 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! # Configure a replacement for <strings.h>. -# serial 4 +# serial 5 # Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -22,7 +22,11 @@ AC_DEFUN([gl_HEADER_STRINGS_H_BODY], dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include <strings.h> + gl_WARN_ON_USE_PREPARE([[ + /* Minix 3.1.8 has a bug: <sys/types.h> must be included before + <strings.h>. */ + #include <sys/types.h> + #include <strings.h> ]], [ffs strcasecmp strncasecmp]) ]) diff --git a/gnulib/m4/sys_utsname_h.m4 b/gnulib/m4/sys_utsname_h.m4 index 2391a4079..48324aea3 100644 --- a/gnulib/m4/sys_utsname_h.m4 +++ b/gnulib/m4/sys_utsname_h.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# sys_utsname_h.m4 serial 7 +# sys_utsname_h.m4 serial 8 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -22,6 +22,9 @@ AC_DEFUN([gl_SYS_UTSNAME_H], else HAVE_SYS_UTSNAME_H=1 AC_CHECK_TYPES([struct utsname], [], [HAVE_STRUCT_UTSNAME=0], [[ +/* Minix 3.1.8 has a bug: <stddef.h> must be included before + <sys/utsname.h>. */ +#include <stddef.h> #include <sys/utsname.h> ]]) fi @@ -29,7 +32,11 @@ AC_DEFUN([gl_SYS_UTSNAME_H], dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include <sys/utsname.h> + gl_WARN_ON_USE_PREPARE([[ + /* Minix 3.1.8 has a bug: <stddef.h> must be included before + <sys/utsname.h>. */ + #include <stddef.h> + #include <sys/utsname.h> ]], [uname]) ]) diff --git a/gnulib/m4/wcrtomb.m4 b/gnulib/m4/wcrtomb.m4 index 34a7f860c..70e3a156f 100644 --- a/gnulib/m4/wcrtomb.m4 +++ b/gnulib/m4/wcrtomb.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# wcrtomb.m4 serial 10 +# wcrtomb.m4 serial 11 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -16,6 +16,22 @@ AC_DEFUN([gl_FUNC_WCRTOMB], AC_CHECK_FUNCS_ONCE([wcrtomb]) if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 + AC_CHECK_DECLS([wcrtomb],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before + <wchar.h>. + BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be + included before <wchar.h>. */ +#include <stddef.h> +#include <stdio.h> +#include <time.h> +#include <wchar.h> +]]) + if test $ac_cv_have_decl_wcrtomb = yes; then + dnl On Minix 3.1.8, the system's <wchar.h> declares wcrtomb() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_WCRTOMB=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 diff --git a/gnulib/m4/wctype_h.m4 b/gnulib/m4/wctype_h.m4 index 34729e0c2..a584a9f64 100644 --- a/gnulib/m4/wctype_h.m4 +++ b/gnulib/m4/wctype_h.m4 @@ -1,6 +1,6 @@ # -*- buffer-read-only: t -*- vi: set ro: # DO NOT EDIT! GENERATED AUTOMATICALLY! -# wctype_h.m4 serial 14 +# wctype_h.m4 serial 16 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it. @@ -77,7 +77,44 @@ AC_DEFUN([gl_WCTYPE_H], AC_SUBST([REPLACE_ISWCNTRL]) if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>. + dnl Redefine all of iswcntrl, ..., iswxdigit in <wctype.h>. + : + fi + + if test $REPLACE_ISWCNTRL = 1; then + REPLACE_TOWLOWER=1 + else + AC_CHECK_FUNCS([towlower]) + if test $ac_cv_func_towlower = yes; then + REPLACE_TOWLOWER=0 + else + AC_CHECK_DECLS([towlower],,, + [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be + included before <wchar.h>. + BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> + must be included before <wchar.h>. */ + #include <stddef.h> + #include <stdio.h> + #include <time.h> + #include <wchar.h> + #if HAVE_WCTYPE_H + # include <wctype.h> + #endif + ]]) + if test $ac_cv_have_decl_towlower = yes; then + dnl On Minix 3.1.8, the system's <wctype.h> declares towlower() and + dnl towupper() although it does not have the functions. Avoid a + dnl collision with gnulib's replacement. + REPLACE_TOWLOWER=1 + else + REPLACE_TOWLOWER=0 + fi + fi + fi + AC_SUBST([REPLACE_TOWLOWER]) + + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then + dnl Redefine towlower, towupper in <wctype.h>. : fi diff --git a/gnulib/tests/Makefile.in b/gnulib/tests/Makefile.in index f01cffaf4..df3d1b00f 100644 --- a/gnulib/tests/Makefile.in +++ b/gnulib/tests/Makefile.in @@ -59,9 +59,10 @@ TESTS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ test-fcntl$(EXEEXT) test-fflush$(EXEEXT) test-fflush2.sh \ test-ffs$(EXEEXT) test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ test-fpurge$(EXEEXT) test-freading$(EXEEXT) test-fseek.sh \ - test-fseek2.sh test-fseeko.sh test-fseeko2.sh test-ftell.sh \ - test-ftell2.sh test-ftell3$(EXEEXT) test-ftello.sh \ - test-ftello2.sh test-ftello3$(EXEEXT) test-func$(EXEEXT) \ + test-fseek2.sh test-fseeko.sh test-fseeko2.sh test-fseeko3.sh \ + test-fsync$(EXEEXT) test-ftell.sh test-ftell2.sh \ + test-ftell3$(EXEEXT) test-ftello.sh test-ftello2.sh \ + test-ftello3$(EXEEXT) test-func$(EXEEXT) \ test-getaddrinfo$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \ test-getdelim$(EXEEXT) test-getdtablesize$(EXEEXT) \ test-getgroups$(EXEEXT) test-gethostname$(EXEEXT) \ @@ -79,31 +80,31 @@ TESTS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ test-memchr$(EXEEXT) test-netdb$(EXEEXT) \ test-netinet_in$(EXEEXT) test-nonblocking-pipe.sh \ test-nonblocking-socket.sh test-nonblocking$(EXEEXT) \ - test-open$(EXEEXT) test-passfd$(EXEEXT) test-perror.sh \ - test-perror2$(EXEEXT) test-pipe$(EXEEXT) test-pipe2$(EXEEXT) \ - test-poll-h$(EXEEXT) test-poll$(EXEEXT) $(am__EXEEXT_1) \ - test-pthread_sigmask1$(EXEEXT) test-pthread_sigmask2$(EXEEXT) \ - test-random_r$(EXEEXT) test-rawmemchr$(EXEEXT) \ - test-readlink$(EXEEXT) test-realloc-gnu$(EXEEXT) \ - test-sched$(EXEEXT) test-select$(EXEEXT) test-select-in.sh \ - test-select-out.sh test-setenv$(EXEEXT) test-setlocale1.sh \ - test-setlocale2.sh test-sigaction$(EXEEXT) \ - test-signal$(EXEEXT) test-sigpipe.sh test-sigprocmask$(EXEEXT) \ - test-sleep$(EXEEXT) test-snprintf$(EXEEXT) \ - test-sockets$(EXEEXT) test-spawn$(EXEEXT) test-stat$(EXEEXT) \ - test-stat-time$(EXEEXT) test-stdbool$(EXEEXT) \ - test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ - test-stdlib$(EXEEXT) test-strchrnul$(EXEEXT) \ - test-strerror$(EXEEXT) test-strerror_r$(EXEEXT) \ - test-string$(EXEEXT) test-strings$(EXEEXT) \ - test-strnlen$(EXEEXT) test-symlink$(EXEEXT) \ - test-sys_ioctl$(EXEEXT) test-sys_select$(EXEEXT) \ - test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \ - test-sys_time$(EXEEXT) test-sys_uio$(EXEEXT) \ - test-sys_utsname$(EXEEXT) test-sys_wait$(EXEEXT) \ - test-termios$(EXEEXT) test-thread_self$(EXEEXT) \ - test-thread_create$(EXEEXT) test-time$(EXEEXT) \ - test-uname$(EXEEXT) test-unistd$(EXEEXT) \ + test-open$(EXEEXT) test-passfd$(EXEEXT) test-pathmax$(EXEEXT) \ + test-perror.sh test-perror2$(EXEEXT) test-pipe$(EXEEXT) \ + test-pipe2$(EXEEXT) test-poll-h$(EXEEXT) test-poll$(EXEEXT) \ + $(am__EXEEXT_1) test-pthread_sigmask1$(EXEEXT) \ + test-pthread_sigmask2$(EXEEXT) test-random_r$(EXEEXT) \ + test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \ + test-realloc-gnu$(EXEEXT) test-sched$(EXEEXT) \ + test-select$(EXEEXT) test-select-in.sh test-select-out.sh \ + test-setenv$(EXEEXT) test-setlocale1.sh test-setlocale2.sh \ + test-sigaction$(EXEEXT) test-signal$(EXEEXT) test-sigpipe.sh \ + test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \ + test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \ + test-spawn$(EXEEXT) test-stat$(EXEEXT) test-stat-time$(EXEEXT) \ + test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ + test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ + test-strchrnul$(EXEEXT) test-strerror$(EXEEXT) \ + test-strerror_r$(EXEEXT) test-string$(EXEEXT) \ + test-strings$(EXEEXT) test-strnlen$(EXEEXT) \ + test-symlink$(EXEEXT) test-sys_ioctl$(EXEEXT) \ + test-sys_select$(EXEEXT) test-sys_socket$(EXEEXT) \ + test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \ + test-sys_uio$(EXEEXT) test-sys_utsname$(EXEEXT) \ + test-sys_wait$(EXEEXT) test-termios$(EXEEXT) \ + test-thread_self$(EXEEXT) test-thread_create$(EXEEXT) \ + test-time$(EXEEXT) test-uname$(EXEEXT) test-unistd$(EXEEXT) \ test-unsetenv$(EXEEXT) test-usleep$(EXEEXT) \ test-vasnprintf$(EXEEXT) test-vasprintf$(EXEEXT) \ test-vc-list-files-git.sh test-vc-list-files-cvs.sh \ @@ -127,9 +128,9 @@ check_PROGRAMS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ test-fcntl$(EXEEXT) test-fflush$(EXEEXT) test-fflush2$(EXEEXT) \ test-ffs$(EXEEXT) test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ test-fpurge$(EXEEXT) test-freading$(EXEEXT) \ - test-fseek$(EXEEXT) test-fseeko$(EXEEXT) test-ftell$(EXEEXT) \ - test-ftell3$(EXEEXT) test-ftello$(EXEEXT) \ - test-ftello3$(EXEEXT) test-func$(EXEEXT) \ + test-fseek$(EXEEXT) test-fseeko$(EXEEXT) test-fseeko3$(EXEEXT) \ + test-fsync$(EXEEXT) test-ftell$(EXEEXT) test-ftell3$(EXEEXT) \ + test-ftello$(EXEEXT) test-ftello3$(EXEEXT) test-func$(EXEEXT) \ test-getaddrinfo$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \ test-getdelim$(EXEEXT) test-getdtablesize$(EXEEXT) \ test-getgroups$(EXEEXT) test-gethostname$(EXEEXT) \ @@ -147,32 +148,33 @@ check_PROGRAMS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ test-nonblocking-socket-main$(EXEEXT) \ test-nonblocking-socket-child$(EXEEXT) \ test-nonblocking$(EXEEXT) test-open$(EXEEXT) \ - test-passfd$(EXEEXT) test-perror$(EXEEXT) \ - test-perror2$(EXEEXT) test-pipe$(EXEEXT) test-pipe2$(EXEEXT) \ - test-poll-h$(EXEEXT) test-poll$(EXEEXT) $(am__EXEEXT_1) \ - test-pthread_sigmask1$(EXEEXT) test-pthread_sigmask2$(EXEEXT) \ - test-random_r$(EXEEXT) test-rawmemchr$(EXEEXT) \ - test-readlink$(EXEEXT) test-realloc-gnu$(EXEEXT) \ - test-sched$(EXEEXT) test-select$(EXEEXT) \ - test-select-fd$(EXEEXT) test-select-stdin$(EXEEXT) \ - test-setenv$(EXEEXT) test-setlocale1$(EXEEXT) \ - test-setlocale2$(EXEEXT) test-sigaction$(EXEEXT) \ - test-signal$(EXEEXT) test-sigpipe$(EXEEXT) \ - test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \ - test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \ - test-spawn$(EXEEXT) test-stat$(EXEEXT) test-stat-time$(EXEEXT) \ - test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ - test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ - test-strchrnul$(EXEEXT) test-strerror$(EXEEXT) \ - test-strerror_r$(EXEEXT) test-string$(EXEEXT) \ - test-strings$(EXEEXT) test-strnlen$(EXEEXT) \ - test-symlink$(EXEEXT) test-sys_ioctl$(EXEEXT) \ - test-sys_select$(EXEEXT) test-sys_socket$(EXEEXT) \ - test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \ - test-sys_uio$(EXEEXT) test-sys_utsname$(EXEEXT) \ - test-sys_wait$(EXEEXT) test-termios$(EXEEXT) \ - test-thread_self$(EXEEXT) test-thread_create$(EXEEXT) \ - test-time$(EXEEXT) test-uname$(EXEEXT) test-unistd$(EXEEXT) \ + test-passfd$(EXEEXT) test-pathmax$(EXEEXT) \ + test-perror$(EXEEXT) test-perror2$(EXEEXT) test-pipe$(EXEEXT) \ + test-pipe2$(EXEEXT) test-poll-h$(EXEEXT) test-poll$(EXEEXT) \ + $(am__EXEEXT_1) test-pthread_sigmask1$(EXEEXT) \ + test-pthread_sigmask2$(EXEEXT) test-random_r$(EXEEXT) \ + test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \ + test-realloc-gnu$(EXEEXT) test-sched$(EXEEXT) \ + test-select$(EXEEXT) test-select-fd$(EXEEXT) \ + test-select-stdin$(EXEEXT) test-setenv$(EXEEXT) \ + test-setlocale1$(EXEEXT) test-setlocale2$(EXEEXT) \ + test-sigaction$(EXEEXT) test-signal$(EXEEXT) \ + test-sigpipe$(EXEEXT) test-sigprocmask$(EXEEXT) \ + test-sleep$(EXEEXT) test-snprintf$(EXEEXT) \ + test-sockets$(EXEEXT) test-spawn$(EXEEXT) test-stat$(EXEEXT) \ + test-stat-time$(EXEEXT) test-stdbool$(EXEEXT) \ + test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ + test-stdlib$(EXEEXT) test-strchrnul$(EXEEXT) \ + test-strerror$(EXEEXT) test-strerror_r$(EXEEXT) \ + test-string$(EXEEXT) test-strings$(EXEEXT) \ + test-strnlen$(EXEEXT) test-symlink$(EXEEXT) \ + test-sys_ioctl$(EXEEXT) test-sys_select$(EXEEXT) \ + test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \ + test-sys_time$(EXEEXT) test-sys_uio$(EXEEXT) \ + test-sys_utsname$(EXEEXT) test-sys_wait$(EXEEXT) \ + test-termios$(EXEEXT) test-thread_self$(EXEEXT) \ + test-thread_create$(EXEEXT) test-time$(EXEEXT) \ + test-uname$(EXEEXT) test-unistd$(EXEEXT) \ test-unsetenv$(EXEEXT) test-usleep$(EXEEXT) \ test-vasnprintf$(EXEEXT) test-vasprintf$(EXEEXT) \ test-verify$(EXEEXT) test-vsnprintf$(EXEEXT) \ @@ -224,6 +226,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/freading.m4 \ $(top_srcdir)/gnulib/m4/fseek.m4 \ $(top_srcdir)/gnulib/m4/fseeko.m4 \ + $(top_srcdir)/gnulib/m4/fsync.m4 \ $(top_srcdir)/gnulib/m4/ftell.m4 \ $(top_srcdir)/gnulib/m4/ftello.m4 \ $(top_srcdir)/gnulib/m4/func.m4 \ @@ -248,6 +251,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/intmax_t.m4 \ $(top_srcdir)/gnulib/m4/inttypes.m4 \ $(top_srcdir)/gnulib/m4/ioctl.m4 \ + $(top_srcdir)/gnulib/m4/largefile.m4 \ $(top_srcdir)/gnulib/m4/localcharset.m4 \ $(top_srcdir)/gnulib/m4/locale-fr.m4 \ $(top_srcdir)/gnulib/m4/locale-ja.m4 \ @@ -394,7 +398,6 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru AM_V_AR = $(am__v_AR_$(V)) am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) am__v_AR_0 = @echo " AR " $@; @@ -570,6 +573,16 @@ test_fseeko_OBJECTS = test-fseeko.$(OBJEXT) test_fseeko_LDADD = $(LDADD) test_fseeko_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ libtests.a $(am__DEPENDENCIES_1) +test_fseeko3_SOURCES = test-fseeko3.c +test_fseeko3_OBJECTS = test-fseeko3.$(OBJEXT) +test_fseeko3_LDADD = $(LDADD) +test_fseeko3_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) +test_fsync_SOURCES = test-fsync.c +test_fsync_OBJECTS = test-fsync.$(OBJEXT) +test_fsync_LDADD = $(LDADD) +test_fsync_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) test_ftell_SOURCES = test-ftell.c test_ftell_OBJECTS = test-ftell.$(OBJEXT) test_ftell_LDADD = $(LDADD) @@ -754,6 +767,11 @@ test_open_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ test_passfd_SOURCES = test-passfd.c test_passfd_OBJECTS = test-passfd.$(OBJEXT) test_passfd_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_pathmax_SOURCES = test-pathmax.c +test_pathmax_OBJECTS = test-pathmax.$(OBJEXT) +test_pathmax_LDADD = $(LDADD) +test_pathmax_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) test_perror_SOURCES = test-perror.c test_perror_OBJECTS = test-perror.$(OBJEXT) test_perror_LDADD = $(LDADD) @@ -1103,21 +1121,21 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-fclose.c test-fcntl.c test-fcntl-h.c test-fflush.c \ test-fflush2.c test-ffs.c test-float.c test-fnmatch.c \ test-fpurge.c test-freading.c test-fseek.c test-fseeko.c \ - test-ftell.c test-ftell3.c test-ftello.c test-ftello3.c \ - test-func.c test-getaddrinfo.c test-getcwd-lgpl.c \ - test-getdelim.c test-getdtablesize.c test-getgroups.c \ - test-gethostname.c test-getline.c test-gettimeofday.c \ - test-ignore-value.c test-inet_ntop.c test-inet_pton.c \ - test-intprops.c test-inttypes.c test-locale.c \ + test-fseeko3.c test-fsync.c test-ftell.c test-ftell3.c \ + test-ftello.c test-ftello3.c test-func.c test-getaddrinfo.c \ + test-getcwd-lgpl.c test-getdelim.c test-getdtablesize.c \ + test-getgroups.c test-gethostname.c test-getline.c \ + test-gettimeofday.c test-ignore-value.c test-inet_ntop.c \ + test-inet_pton.c test-intprops.c test-inttypes.c test-locale.c \ test-localename.c test-lock.c test-lseek.c test-lstat.c \ test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \ test-mbsinit.c test-mbsrtowcs.c test-md5.c test-memchr.c \ test-netdb.c test-netinet_in.c test-nonblocking.c \ test-nonblocking-pipe-child.c test-nonblocking-pipe-main.c \ test-nonblocking-socket-child.c test-nonblocking-socket-main.c \ - test-open.c test-passfd.c test-perror.c test-perror2.c \ - test-pipe.c test-pipe2.c test-poll.c test-poll-h.c \ - test-posix_spawn1.c test-posix_spawn2.c \ + test-open.c test-passfd.c test-pathmax.c test-perror.c \ + test-perror2.c test-pipe.c test-pipe2.c test-poll.c \ + test-poll-h.c test-posix_spawn1.c test-posix_spawn2.c \ test-pthread_sigmask1.c test-pthread_sigmask2.c \ test-random_r.c test-rawmemchr.c test-readlink.c \ test-realloc-gnu.c test-sched.c test-select.c test-select-fd.c \ @@ -1146,21 +1164,21 @@ DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-fclose.c test-fcntl.c test-fcntl-h.c test-fflush.c \ test-fflush2.c test-ffs.c test-float.c test-fnmatch.c \ test-fpurge.c test-freading.c test-fseek.c test-fseeko.c \ - test-ftell.c test-ftell3.c test-ftello.c test-ftello3.c \ - test-func.c test-getaddrinfo.c test-getcwd-lgpl.c \ - test-getdelim.c test-getdtablesize.c test-getgroups.c \ - test-gethostname.c test-getline.c test-gettimeofday.c \ - test-ignore-value.c test-inet_ntop.c test-inet_pton.c \ - test-intprops.c test-inttypes.c test-locale.c \ + test-fseeko3.c test-fsync.c test-ftell.c test-ftell3.c \ + test-ftello.c test-ftello3.c test-func.c test-getaddrinfo.c \ + test-getcwd-lgpl.c test-getdelim.c test-getdtablesize.c \ + test-getgroups.c test-gethostname.c test-getline.c \ + test-gettimeofday.c test-ignore-value.c test-inet_ntop.c \ + test-inet_pton.c test-intprops.c test-inttypes.c test-locale.c \ test-localename.c test-lock.c test-lseek.c test-lstat.c \ test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \ test-mbsinit.c test-mbsrtowcs.c test-md5.c test-memchr.c \ test-netdb.c test-netinet_in.c test-nonblocking.c \ test-nonblocking-pipe-child.c test-nonblocking-pipe-main.c \ test-nonblocking-socket-child.c test-nonblocking-socket-main.c \ - test-open.c test-passfd.c test-perror.c test-perror2.c \ - test-pipe.c test-pipe2.c test-poll.c test-poll-h.c \ - test-posix_spawn1.c test-posix_spawn2.c \ + test-open.c test-passfd.c test-pathmax.c test-perror.c \ + test-perror2.c test-pipe.c test-pipe2.c test-poll.c \ + test-poll-h.c test-posix_spawn1.c test-posix_spawn2.c \ test-pthread_sigmask1.c test-pthread_sigmask2.c \ test-random_r.c test-rawmemchr.c test-readlink.c \ test-realloc-gnu.c test-sched.c test-select.c test-select-fd.c \ @@ -1233,6 +1251,7 @@ APPARMOR_CFLAGS = @APPARMOR_CFLAGS@ APPARMOR_LIBS = @APPARMOR_LIBS@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ +ARFLAGS = @ARFLAGS@ AS = @AS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUDIT_CFLAGS = @AUDIT_CFLAGS@ @@ -1249,6 +1268,8 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BLKID_CFLAGS = @BLKID_CFLAGS@ +BLKID_LIBS = @BLKID_LIBS@ BRCTL = @BRCTL@ BYTESWAP_H = @BYTESWAP_H@ CAPNG_CFLAGS = @CAPNG_CFLAGS@ @@ -1867,6 +1888,7 @@ LIBTOOL = @LIBTOOL@ LIBVIRT_MAJOR_VERSION = @LIBVIRT_MAJOR_VERSION@ LIBVIRT_MICRO_VERSION = @LIBVIRT_MICRO_VERSION@ LIBVIRT_MINOR_VERSION = @LIBVIRT_MINOR_VERSION@ +LIBVIRT_NODELETE = @LIBVIRT_NODELETE@ LIBVIRT_QEMU_SYMBOL_FILE = @LIBVIRT_QEMU_SYMBOL_FILE@ LIBVIRT_SYMBOL_FILE = @LIBVIRT_SYMBOL_FILE@ LIBVIRT_VERSION = @LIBVIRT_VERSION@ @@ -1904,6 +1926,7 @@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MINGW_EXTRA_LDFLAGS = @MINGW_EXTRA_LDFLAGS@ MKDIR_P = @MKDIR_P@ +MKFS = @MKFS@ MODPROBE = @MODPROBE@ MOUNT = @MOUNT@ MSCOM_LIBS = @MSCOM_LIBS@ @@ -1985,6 +2008,8 @@ NUMACTL_CFLAGS = @NUMACTL_CFLAGS@ NUMACTL_LIBS = @NUMACTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OPENWSMAN_CFLAGS = @OPENWSMAN_CFLAGS@ +OPENWSMAN_LIBS = @OPENWSMAN_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ @@ -2132,6 +2157,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ @@ -2316,31 +2342,32 @@ EXTRA_DIST = test-alignof.c test-alloca-opt.c test-areadlink.h \ macros.h fpucw.h test-fpurge.c macros.h test-freading.c \ macros.h test-fseek.c test-fseek.sh test-fseek2.sh signature.h \ macros.h test-fseeko.c test-fseeko.sh test-fseeko2.sh \ - signature.h macros.h test-ftell.c test-ftell.sh test-ftell2.sh \ - test-ftell3.c signature.h macros.h test-ftello.c \ - test-ftello.sh test-ftello2.sh test-ftello3.c signature.h \ - macros.h test-func.c macros.h signature.h test-getaddrinfo.c \ - test-getcwd-lgpl.c signature.h macros.h test-getdelim.c \ - signature.h macros.h test-getdtablesize.c signature.h macros.h \ - getgroups.c test-getgroups.c signature.h macros.h signature.h \ - test-gethostname.c test-getline.c signature.h macros.h \ - getpagesize.c getsockopt.c w32sock.h signature.h \ - test-gettimeofday.c getugroups.h test-ignore-value.c \ - test-inet_ntop.c signature.h macros.h test-inet_pton.c \ - signature.h macros.h test-intprops.c macros.h inttypes.in.h \ - test-inttypes.c locale.in.h test-locale.c localename.h \ - test-localename.c macros.h test-lock.c test-lseek.c \ - test-lseek.sh signature.h macros.h test-lstat.h test-lstat.c \ - signature.h macros.h test-malloca.c test-mbrtowc1.sh \ - test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ - test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ - test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \ - test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h \ - test-mbsinit.sh test-mbsinit.c signature.h macros.h \ - test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \ - test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h \ - mbtowc-impl.h mbtowc.c test-memchr.c zerosize-ptr.h \ - signature.h macros.h mgetgroups.h test-netdb.c \ + test-fseeko3.c test-fseeko3.sh signature.h macros.h \ + test-fsync.c signature.h macros.h test-ftell.c test-ftell.sh \ + test-ftell2.sh test-ftell3.c signature.h macros.h \ + test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c \ + signature.h macros.h test-func.c macros.h signature.h \ + test-getaddrinfo.c test-getcwd-lgpl.c signature.h macros.h \ + test-getdelim.c signature.h macros.h test-getdtablesize.c \ + signature.h macros.h getgroups.c test-getgroups.c signature.h \ + macros.h signature.h test-gethostname.c test-getline.c \ + signature.h macros.h getpagesize.c getsockopt.c w32sock.h \ + signature.h test-gettimeofday.c getugroups.h \ + test-ignore-value.c test-inet_ntop.c signature.h macros.h \ + test-inet_pton.c signature.h macros.h test-intprops.c macros.h \ + inttypes.in.h test-inttypes.c locale.in.h test-locale.c \ + localename.h test-localename.c macros.h test-lock.c \ + test-lseek.c test-lseek.sh signature.h macros.h test-lstat.h \ + test-lstat.c signature.h macros.h test-malloca.c \ + test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \ + test-mbrtowc4.sh test-mbrtowc.c test-mbrtowc-w32-1.sh \ + test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \ + test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c \ + signature.h macros.h test-mbsinit.sh test-mbsinit.c \ + signature.h macros.h test-mbsrtowcs1.sh test-mbsrtowcs2.sh \ + test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs.c \ + signature.h macros.h mbtowc-impl.h mbtowc.c test-memchr.c \ + zerosize-ptr.h signature.h macros.h mgetgroups.h test-netdb.c \ test-netinet_in.c test-nonblocking-pipe.sh \ test-nonblocking-pipe-main.c test-nonblocking-pipe-child.c \ test-nonblocking-pipe.h test-nonblocking-writer.h \ @@ -2350,11 +2377,11 @@ EXTRA_DIST = test-alignof.c test-alloca-opt.c test-areadlink.h \ test-nonblocking-writer.h test-nonblocking-reader.h \ test-nonblocking-misc.h socket-server.h socket-client.h \ macros.h test-nonblocking.c macros.h test-open.h test-open.c \ - signature.h macros.h test-passfd.c macros.h init.sh macros.h \ - signature.h test-perror.c test-perror2.c test-perror.sh \ - test-pipe.c signature.h macros.h test-pipe2.c signature.h \ - macros.h test-poll-h.c signature.h test-poll.c spawn_int.h \ - spawni.c spawn_faction_addclose.c spawn_int.h \ + signature.h macros.h test-passfd.c macros.h test-pathmax.c \ + init.sh macros.h signature.h test-perror.c test-perror2.c \ + test-perror.sh test-pipe.c signature.h macros.h test-pipe2.c \ + signature.h macros.h test-poll-h.c signature.h test-poll.c \ + spawn_int.h spawni.c spawn_faction_addclose.c spawn_int.h \ spawn_faction_adddup2.c spawn_int.h spawn_faction_addopen.c \ spawn_int.h spawn_faction_destroy.c spawn_faction_init.c \ spawn_int.h spawnattr_destroy.c spawnattr_init.c \ @@ -2643,6 +2670,12 @@ test-fseek$(EXEEXT): $(test_fseek_OBJECTS) $(test_fseek_DEPENDENCIES) test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES) @rm -f test-fseeko$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fseeko_OBJECTS) $(test_fseeko_LDADD) $(LIBS) +test-fseeko3$(EXEEXT): $(test_fseeko3_OBJECTS) $(test_fseeko3_DEPENDENCIES) + @rm -f test-fseeko3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_fseeko3_OBJECTS) $(test_fseeko3_LDADD) $(LIBS) +test-fsync$(EXEEXT): $(test_fsync_OBJECTS) $(test_fsync_DEPENDENCIES) + @rm -f test-fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_fsync_OBJECTS) $(test_fsync_LDADD) $(LIBS) test-ftell$(EXEEXT): $(test_ftell_OBJECTS) $(test_ftell_DEPENDENCIES) @rm -f test-ftell$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ftell_OBJECTS) $(test_ftell_LDADD) $(LIBS) @@ -2760,6 +2793,9 @@ test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) test-passfd$(EXEEXT): $(test_passfd_OBJECTS) $(test_passfd_DEPENDENCIES) @rm -f test-passfd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_passfd_OBJECTS) $(test_passfd_LDADD) $(LIBS) +test-pathmax$(EXEEXT): $(test_pathmax_OBJECTS) $(test_pathmax_DEPENDENCIES) + @rm -f test-pathmax$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_pathmax_OBJECTS) $(test_pathmax_LDADD) $(LIBS) test-perror$(EXEEXT): $(test_perror_OBJECTS) $(test_perror_DEPENDENCIES) @rm -f test-perror$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_perror_OBJECTS) $(test_perror_LDADD) $(LIBS) @@ -3032,6 +3068,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freading.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fsync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello.Po@am__quote@ @@ -3071,6 +3109,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nonblocking.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-passfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pathmax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pipe.Po@am__quote@ diff --git a/gnulib/tests/gnulib.mk b/gnulib/tests/gnulib.mk index eba0fbc8f..6327ede29 100644 --- a/gnulib/tests/gnulib.mk +++ b/gnulib/tests/gnulib.mk @@ -332,12 +332,20 @@ EXTRA_DIST += test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h ## begin gnulib module fseeko-tests -TESTS += test-fseeko.sh test-fseeko2.sh -check_PROGRAMS += test-fseeko -EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h macros.h +TESTS += test-fseeko.sh test-fseeko2.sh test-fseeko3.sh +check_PROGRAMS += test-fseeko test-fseeko3 +EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh test-fseeko3.c test-fseeko3.sh signature.h macros.h ## end gnulib module fseeko-tests +## begin gnulib module fsync-tests + +TESTS += test-fsync +check_PROGRAMS += test-fsync +EXTRA_DIST += test-fsync.c signature.h macros.h + +## end gnulib module fsync-tests + ## begin gnulib module ftell-tests TESTS += test-ftell.sh test-ftell2.sh test-ftell3 @@ -771,6 +779,14 @@ EXTRA_DIST += test-passfd.c macros.h ## end gnulib module passfd-tests +## begin gnulib module pathmax-tests + +TESTS += test-pathmax +check_PROGRAMS += test-pathmax +EXTRA_DIST += test-pathmax.c + +## end gnulib module pathmax-tests + ## begin gnulib module perror-tests TESTS += test-perror.sh test-perror2 diff --git a/gnulib/tests/init.sh b/gnulib/tests/init.sh index 0da6c1e32..e6f5f1c42 100644 --- a/gnulib/tests/init.sh +++ b/gnulib/tests/init.sh @@ -208,8 +208,10 @@ export MALLOC_PERTURB_ # a partition, or to undo any other global state changes. cleanup_ () { :; } -if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then +if ( diff -u "$0" "$0" < /dev/null ) > /dev/null 2>&1; then compare () { diff -u "$@"; } +elif ( diff -c "$0" "$0" < /dev/null ) > /dev/null 2>&1; then + compare () { diff -c "$@"; } elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then compare () { cmp -s "$@"; } else diff --git a/gnulib/tests/test-base64.c b/gnulib/tests/test-base64.c index 21aa32efe..1f4689d5c 100644 --- a/gnulib/tests/test-base64.c +++ b/gnulib/tests/test-base64.c @@ -186,9 +186,8 @@ main (void) ok = base64_decode_alloc_ctx (&ctx, "hp", 2, &p, &len); ASSERT (ok); - ASSERT (len == 2); - /* Actually this looks buggy. Shouldn't output be 'ghi'? */ - ASSERT (memcmp (p, "gh", len) == 0); + ASSERT (len == 3); + ASSERT (memcmp (p, "ghi", len) == 0); ok = base64_decode_alloc_ctx (&ctx, "", 0, &p, &len); ASSERT (ok); } diff --git a/gnulib/tests/test-float.c b/gnulib/tests/test-float.c index beb00cec6..cb4c1cfae 100644 --- a/gnulib/tests/test-float.c +++ b/gnulib/tests/test-float.c @@ -300,7 +300,14 @@ test_long_double (void) /* Check that 'long double' is at least as wide as 'double'. */ ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG); - ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP); + + /* Normally, we would also assert this: + ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP); + but at least on powerpc64 with gcc-4.4.4, it would fail: + $ :|gcc -dD -E -include stddef.h -|grep -E 'L?DBL_MIN_EXP' + #define __DBL_MIN_EXP__ (-1021) + #define __LDBL_MIN_EXP__ (-968) + */ ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP); /* Check the value of LDBL_DIG. */ diff --git a/gnulib/tests/test-fseeko3.c b/gnulib/tests/test-fseeko3.c new file mode 100644 index 000000000..e1593aae2 --- /dev/null +++ b/gnulib/tests/test-fseeko3.c @@ -0,0 +1,53 @@ +/* -*- buffer-read-only: t -*- vi: set ro: */ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Test of fseeko() function. + Copyright (C) 2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Eric Blake <eblake@redhat.com>, 2011. */ + +#include <config.h> + +#include <stdio.h> + +#include <stdlib.h> + +#include "macros.h" + +int +main (int argc, char **argv) +{ + int do_initial_ftell = atoi (argv[1]); + const char *filename = argv[2]; + FILE *fp = fopen (filename, "r"); + ASSERT (fp != NULL); + + if (do_initial_ftell) + { + off_t pos = ftell (fp); + ASSERT (pos == 0); + } + + ASSERT (fseeko (fp, 0, SEEK_END) == 0); + + { + off_t pos = ftell (fp); + ASSERT (pos > 0); + } + + ASSERT (fclose (fp) == 0); + + return 0; +} diff --git a/gnulib/tests/test-fseeko3.sh b/gnulib/tests/test-fseeko3.sh new file mode 100755 index 000000000..c50b4a225 --- /dev/null +++ b/gnulib/tests/test-fseeko3.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +./test-fseeko3${EXEEXT} 0 "$srcdir/test-fseeko3.sh" || exit 1 + +./test-fseeko3${EXEEXT} 1 "$srcdir/test-fseeko3.sh" || exit 1 + +exit 0 diff --git a/gnulib/tests/test-fsync.c b/gnulib/tests/test-fsync.c new file mode 100644 index 000000000..ec52e18c4 --- /dev/null +++ b/gnulib/tests/test-fsync.c @@ -0,0 +1,52 @@ +/* -*- buffer-read-only: t -*- vi: set ro: */ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Test of fsync() function. + Copyright (C) 2008-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +#include <unistd.h> + +#include "signature.h" +SIGNATURE_CHECK (fsync, int, (int)); + +#include <errno.h> +#include <fcntl.h> + +#include "macros.h" + +int +main (void) +{ + int fd; + const char *file = "test-fsync.txt"; + + if (fsync (0) != 0) + { + ASSERT (errno == EINVAL /* POSIX */ + || errno == ENOTSUP /* seen on MacOS X 10.5 */ + || errno == EBADF /* seen on AIX 7.1 */ + ); + } + fd = open (file, O_WRONLY|O_CREAT|O_TRUNC, 0644); + ASSERT (0 <= fd); + ASSERT (write (fd, "hello", 5) == 5); + ASSERT (fsync (fd) == 0); + ASSERT (close (fd) == 0); + ASSERT (unlink (file) == 0); + + return 0; +} diff --git a/gnulib/tests/test-pathmax.c b/gnulib/tests/test-pathmax.c new file mode 100644 index 000000000..98c7b6586 --- /dev/null +++ b/gnulib/tests/test-pathmax.c @@ -0,0 +1,34 @@ +/* -*- buffer-read-only: t -*- vi: set ro: */ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Test of "pathmax.h". + Copyright (C) 2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Bruno Haible <bruno@clisp.org>, 2011. */ + +#include <config.h> + +#include "pathmax.h" + +/* Check that PATH_MAX is a constant if it is defined. */ +#ifdef PATH_MAX +int a = PATH_MAX; +#endif + +int +main (void) +{ + return 0; +} diff --git a/gnulib/tests/xalloc.h b/gnulib/tests/xalloc.h index e1db073c6..4e12c9f9b 100644 --- a/gnulib/tests/xalloc.h +++ b/gnulib/tests/xalloc.h @@ -194,9 +194,9 @@ x2nrealloc (void *p, size_t *pn, size_t s) { /* The approximate size to use for initial small allocation requests, when the invoking code specifies an old size of - zero. 64 bytes is the largest "small" request for the - GNU C library malloc. */ - enum { DEFAULT_MXFAST = 64 }; + zero. This is the largest "small" request for the GNU C + library malloc. */ + enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; n = DEFAULT_MXFAST / s; n += !n; |