summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile2
-rwxr-xr-xbuild-aux/config.rpath2
-rwxr-xr-xbuild-aux/gendocs.sh281
-rw-r--r--build-aux/pmccabe2html2
-rw-r--r--build-aux/snippet/arg-nonnull.h2
-rw-r--r--build-aux/snippet/c++defs.h2
-rw-r--r--build-aux/snippet/warn-on-use.h4
-rwxr-xr-xbuild-aux/useless-if-before-free2
-rwxr-xr-xbuild-aux/vc-list-files2
-rw-r--r--doc/gendocs_template4
-rw-r--r--gl/Makefile.am28
-rw-r--r--gl/accept.c2
-rw-r--r--gl/alloca.in.h9
-rw-r--r--gl/alphasort.c2
-rw-r--r--gl/argp-ba.c4
-rw-r--r--gl/argp-eexst.c2
-rw-r--r--gl/argp-fmtstream.c2
-rw-r--r--gl/argp-fmtstream.h15
-rw-r--r--gl/argp-fs-xinl.c8
-rw-r--r--gl/argp-help.c3
-rw-r--r--gl/argp-namefrob.h2
-rw-r--r--gl/argp-parse.c6
-rw-r--r--gl/argp-pin.c2
-rw-r--r--gl/argp-pv.c4
-rw-r--r--gl/argp-pvh.c2
-rw-r--r--gl/argp-xinl.c8
-rw-r--r--gl/argp.h13
-rw-r--r--gl/arpa_inet.in.h2
-rw-r--r--gl/asnprintf.c2
-rw-r--r--gl/asprintf.c2
-rw-r--r--gl/base64.c8
-rw-r--r--gl/base64.h10
-rw-r--r--gl/basename-lgpl.c2
-rw-r--r--gl/bind.c2
-rw-r--r--gl/byteswap.in.h2
-rw-r--r--gl/c-ctype.c2
-rw-r--r--gl/c-ctype.h2
-rw-r--r--gl/close.c2
-rw-r--r--gl/closedir.c2
-rw-r--r--gl/connect.c2
-rw-r--r--gl/dirent-private.h2
-rw-r--r--gl/dirent.in.h2
-rw-r--r--gl/dirname-lgpl.c2
-rw-r--r--gl/dirname.h2
-rw-r--r--gl/dosname.h2
-rw-r--r--gl/dup2.c (renamed from gl/tests/dup2.c)5
-rw-r--r--gl/errno.in.h7
-rw-r--r--gl/error.c6
-rw-r--r--gl/error.h2
-rw-r--r--gl/fd-hook.c2
-rw-r--r--gl/fd-hook.h2
-rw-r--r--gl/filename.h2
-rw-r--r--gl/float+.h2
-rw-r--r--gl/float.c2
-rw-r--r--gl/float.in.h2
-rw-r--r--gl/fpucw.h2
-rw-r--r--gl/frexp.c2
-rw-r--r--gl/frexpl.c2
-rw-r--r--gl/fseek.c2
-rw-r--r--gl/fseeko.c8
-rw-r--r--gl/fseterr.c4
-rw-r--r--gl/fseterr.h24
-rw-r--r--gl/fstat.c8
-rw-r--r--gl/ftell.c2
-rw-r--r--gl/ftello.c2
-rw-r--r--gl/gai_strerror.c2
-rw-r--r--gl/getaddrinfo.c8
-rw-r--r--gl/getdelim.c6
-rw-r--r--gl/getline.c2
-rw-r--r--gl/getopt.c2
-rw-r--r--gl/getopt.in.h4
-rw-r--r--gl/getopt1.c2
-rw-r--r--gl/getopt_int.h2
-rw-r--r--gl/getpass.c2
-rw-r--r--gl/getpass.h4
-rw-r--r--gl/getpeername.c2
-rw-r--r--gl/getsubopt.c2
-rw-r--r--gl/gettext.h11
-rw-r--r--gl/gettime.c2
-rw-r--r--gl/gettimeofday.c2
-rw-r--r--gl/glthread/threadlib.c2
-rw-r--r--gl/inet_ntop.c2
-rw-r--r--gl/inet_pton.c2
-rw-r--r--gl/intprops.h2
-rw-r--r--gl/isnan.c2
-rw-r--r--gl/isnand-nolibm.h2
-rw-r--r--gl/isnand.c2
-rw-r--r--gl/isnanf-nolibm.h2
-rw-r--r--gl/isnanf.c2
-rw-r--r--gl/isnanl-nolibm.h2
-rw-r--r--gl/isnanl.c2
-rw-r--r--gl/itold.c2
-rw-r--r--gl/listen.c2
-rw-r--r--gl/lseek.c2
-rw-r--r--gl/m4/00gnulib.m42
-rw-r--r--gl/m4/alloca.m42
-rw-r--r--gl/m4/alphasort.m42
-rw-r--r--gl/m4/argp.m424
-rw-r--r--gl/m4/arpa_inet_h.m42
-rw-r--r--gl/m4/base64.m45
-rw-r--r--gl/m4/byteswap.m42
-rw-r--r--gl/m4/clock_time.m42
-rw-r--r--gl/m4/close.m42
-rw-r--r--gl/m4/closedir.m42
-rw-r--r--gl/m4/codeset.m42
-rw-r--r--gl/m4/dirent_h.m42
-rw-r--r--gl/m4/dirname.m42
-rw-r--r--gl/m4/double-slash-root.m42
-rw-r--r--gl/m4/dup2.m47
-rw-r--r--gl/m4/eealloc.m45
-rw-r--r--gl/m4/environ.m42
-rw-r--r--gl/m4/errno_h.m47
-rw-r--r--gl/m4/error.m43
-rw-r--r--gl/m4/exponentd.m42
-rw-r--r--gl/m4/exponentf.m42
-rw-r--r--gl/m4/exponentl.m42
-rw-r--r--gl/m4/extensions.m449
-rw-r--r--gl/m4/extern-inline.m465
-rw-r--r--gl/m4/fcntl-o.m415
-rw-r--r--gl/m4/fcntl_h.m42
-rw-r--r--gl/m4/fdopen.m48
-rw-r--r--gl/m4/float_h.m42
-rw-r--r--gl/m4/fpieee.m42
-rw-r--r--gl/m4/frexp.m46
-rw-r--r--gl/m4/frexpl.m416
-rw-r--r--gl/m4/fseek.m42
-rw-r--r--gl/m4/fseeko.m42
-rw-r--r--gl/m4/fseterr.m410
-rw-r--r--gl/m4/fstat.m49
-rw-r--r--gl/m4/ftell.m42
-rw-r--r--gl/m4/ftello.m42
-rw-r--r--gl/m4/ftruncate.m45
-rw-r--r--gl/m4/func.m42
-rw-r--r--gl/m4/getaddrinfo.m45
-rw-r--r--gl/m4/getcwd.m44
-rw-r--r--gl/m4/getdelim.m42
-rw-r--r--gl/m4/getline.m42
-rw-r--r--gl/m4/getopt.m4293
-rw-r--r--gl/m4/getpagesize.m42
-rw-r--r--gl/m4/getpass.m42
-rw-r--r--gl/m4/getsubopt.m42
-rw-r--r--gl/m4/gettext.m46
-rw-r--r--gl/m4/gettime.m42
-rw-r--r--gl/m4/gettimeofday.m42
-rw-r--r--gl/m4/glibc2.m42
-rw-r--r--gl/m4/glibc21.m42
-rw-r--r--gl/m4/gnulib-cache.m44
-rw-r--r--gl/m4/gnulib-common.m412
-rw-r--r--gl/m4/gnulib-comp.m41223
-rw-r--r--gl/m4/gnulib-tool.m42
-rw-r--r--gl/m4/hostent.m42
-rw-r--r--gl/m4/iconv.m42
-rw-r--r--gl/m4/include_next.m42
-rw-r--r--gl/m4/inet_ntop.m42
-rw-r--r--gl/m4/inet_pton.m42
-rw-r--r--gl/m4/intdiv0.m46
-rw-r--r--gl/m4/intl.m46
-rw-r--r--gl/m4/intldir.m42
-rw-r--r--gl/m4/intlmacosx.m414
-rw-r--r--gl/m4/intmax.m42
-rw-r--r--gl/m4/intmax_t.m42
-rw-r--r--gl/m4/inttypes-pri.m42
-rw-r--r--gl/m4/inttypes.m42
-rw-r--r--gl/m4/inttypes_h.m42
-rw-r--r--gl/m4/ioctl.m42
-rw-r--r--gl/m4/isnand.m42
-rw-r--r--gl/m4/isnanf.m42
-rw-r--r--gl/m4/isnanl.m42
-rw-r--r--gl/m4/largefile.m427
-rw-r--r--gl/m4/lcmessage.m42
-rw-r--r--gl/m4/ld-output-def.m42
-rw-r--r--gl/m4/ld-version-script.m42
-rw-r--r--gl/m4/ldexpl.m48
-rw-r--r--gl/m4/lib-ld.m460
-rw-r--r--gl/m4/lib-link.m42
-rw-r--r--gl/m4/lib-prefix.m42
-rw-r--r--gl/m4/lock.m412
-rw-r--r--gl/m4/longlong.m42
-rw-r--r--gl/m4/lseek.m42
-rw-r--r--gl/m4/lstat.m410
-rw-r--r--gl/m4/malloc.m42
-rw-r--r--gl/m4/malloca.m42
-rw-r--r--gl/m4/manywarnings.m4187
-rw-r--r--gl/m4/math_h.m45
-rw-r--r--gl/m4/memchr.m42
-rw-r--r--gl/m4/memmem.m42
-rw-r--r--gl/m4/mempcpy.m42
-rw-r--r--gl/m4/minmax.m42
-rw-r--r--gl/m4/mmap-anon.m46
-rw-r--r--gl/m4/mode_t.m42
-rw-r--r--gl/m4/msvc-inval.m42
-rw-r--r--gl/m4/msvc-nothrow.m42
-rw-r--r--gl/m4/multiarch.m46
-rw-r--r--gl/m4/netdb_h.m42
-rw-r--r--gl/m4/netinet_in_h.m42
-rw-r--r--gl/m4/nls.m42
-rw-r--r--gl/m4/nocrash.m46
-rw-r--r--gl/m4/off_t.m42
-rw-r--r--gl/m4/open.m45
-rw-r--r--gl/m4/opendir.m42
-rw-r--r--gl/m4/pathmax.m42
-rw-r--r--gl/m4/perror.m42
-rw-r--r--gl/m4/pipe.m42
-rw-r--r--gl/m4/po.m46
-rw-r--r--gl/m4/printf-frexp.m42
-rw-r--r--gl/m4/printf-frexpl.m48
-rw-r--r--gl/m4/printf-posix.m42
-rw-r--r--gl/m4/printf.m431
-rw-r--r--gl/m4/progtest.m42
-rw-r--r--gl/m4/putenv.m48
-rw-r--r--gl/m4/rawmemchr.m42
-rw-r--r--gl/m4/read-file.m42
-rw-r--r--gl/m4/readdir.m42
-rw-r--r--gl/m4/realloc.m42
-rw-r--r--gl/m4/scandir.m42
-rw-r--r--gl/m4/select.m442
-rw-r--r--gl/m4/servent.m42
-rw-r--r--gl/m4/setenv.m42
-rw-r--r--gl/m4/signal_h.m42
-rw-r--r--gl/m4/signbit.m46
-rw-r--r--gl/m4/size_max.m42
-rw-r--r--gl/m4/sleep.m42
-rw-r--r--gl/m4/snprintf.m42
-rw-r--r--gl/m4/socketlib.m42
-rw-r--r--gl/m4/sockets.m42
-rw-r--r--gl/m4/socklen.m42
-rw-r--r--gl/m4/sockpfaf.m42
-rw-r--r--gl/m4/ssize_t.m42
-rw-r--r--gl/m4/stat.m410
-rw-r--r--gl/m4/stdalign.m42
-rw-r--r--gl/m4/stdarg.m42
-rw-r--r--gl/m4/stdbool.m42
-rw-r--r--gl/m4/stddef_h.m42
-rw-r--r--gl/m4/stdint.m42
-rw-r--r--gl/m4/stdint_h.m42
-rw-r--r--gl/m4/stdio_h.m47
-rw-r--r--gl/m4/stdlib_h.m49
-rw-r--r--gl/m4/strcase.m42
-rw-r--r--gl/m4/strchrnul.m42
-rw-r--r--gl/m4/strdup.m42
-rw-r--r--gl/m4/strerror.m42
-rw-r--r--gl/m4/strerror_r.m46
-rw-r--r--gl/m4/string_h.m42
-rw-r--r--gl/m4/strings_h.m42
-rw-r--r--gl/m4/strndup.m46
-rw-r--r--gl/m4/strnlen.m42
-rw-r--r--gl/m4/strtok_r.m42
-rw-r--r--gl/m4/strverscmp.m42
-rw-r--r--gl/m4/symlink.m42
-rw-r--r--gl/m4/sys_ioctl_h.m42
-rw-r--r--gl/m4/sys_select_h.m42
-rw-r--r--gl/m4/sys_socket_h.m45
-rw-r--r--gl/m4/sys_stat_h.m47
-rw-r--r--gl/m4/sys_time_h.m410
-rw-r--r--gl/m4/sys_types_h.m42
-rw-r--r--gl/m4/sys_uio_h.m42
-rw-r--r--gl/m4/sysexits.m42
-rw-r--r--gl/m4/threadlib.m456
-rw-r--r--gl/m4/time_h.m46
-rw-r--r--gl/m4/time_r.m44
-rw-r--r--gl/m4/timer_time.m46
-rw-r--r--gl/m4/timespec.m410
-rw-r--r--gl/m4/uintmax_t.m42
-rw-r--r--gl/m4/ungetc.m42
-rw-r--r--gl/m4/unistd_h.m45
-rw-r--r--gl/m4/valgrind-tests.m42
-rw-r--r--gl/m4/vasnprintf.m45
-rw-r--r--gl/m4/vasprintf.m42
-rw-r--r--gl/m4/version-etc.m42
-rw-r--r--gl/m4/vfprintf-posix.m42
-rw-r--r--gl/m4/visibility.m46
-rw-r--r--gl/m4/vprintf-posix.m42
-rw-r--r--gl/m4/vsnprintf.m42
-rw-r--r--gl/m4/warn-on-use.m42
-rw-r--r--gl/m4/warnings.m42
-rw-r--r--gl/m4/wchar_h.m42
-rw-r--r--gl/m4/wchar_t.m42
-rw-r--r--gl/m4/wint_t.m42
-rw-r--r--gl/m4/xsize.m45
-rw-r--r--gl/malloc.c2
-rw-r--r--gl/math.c3
-rw-r--r--gl/math.in.h15
-rw-r--r--gl/memchr.c2
-rw-r--r--gl/memmem.c2
-rw-r--r--gl/mempcpy.c2
-rw-r--r--gl/minmax.h2
-rw-r--r--gl/msvc-inval.c2
-rw-r--r--gl/msvc-inval.h2
-rw-r--r--gl/msvc-nothrow.c2
-rw-r--r--gl/msvc-nothrow.h2
-rw-r--r--gl/netdb.in.h2
-rw-r--r--gl/netinet_in.in.h2
-rw-r--r--gl/opendir.c2
-rw-r--r--gl/printf-args.c2
-rw-r--r--gl/printf-args.h2
-rw-r--r--gl/printf-frexp.c2
-rw-r--r--gl/printf-frexp.h2
-rw-r--r--gl/printf-frexpl.c2
-rw-r--r--gl/printf-frexpl.h2
-rw-r--r--gl/printf-parse.c4
-rw-r--r--gl/printf-parse.h2
-rw-r--r--gl/progname.c2
-rw-r--r--gl/progname.h2
-rw-r--r--gl/rawmemchr.c2
-rw-r--r--gl/read-file.c2
-rw-r--r--gl/read-file.h2
-rw-r--r--gl/readdir.c2
-rw-r--r--gl/realloc.c2
-rw-r--r--gl/recv.c2
-rw-r--r--gl/recvfrom.c2
-rw-r--r--gl/scandir.c2
-rw-r--r--gl/select.c21
-rw-r--r--gl/send.c2
-rw-r--r--gl/sendto.c2
-rw-r--r--gl/setsockopt.c2
-rw-r--r--gl/shutdown.c2
-rw-r--r--gl/signal.in.h14
-rw-r--r--gl/signbitd.c2
-rw-r--r--gl/signbitf.c2
-rw-r--r--gl/signbitl.c2
-rw-r--r--gl/size_max.h2
-rw-r--r--gl/sleep.c2
-rw-r--r--gl/snprintf.c2
-rw-r--r--gl/socket.c2
-rw-r--r--gl/sockets.c2
-rw-r--r--gl/sockets.h2
-rw-r--r--gl/stdalign.in.h2
-rw-r--r--gl/stdarg.in.h2
-rw-r--r--gl/stdbool.in.h53
-rw-r--r--gl/stddef.in.h2
-rw-r--r--gl/stdint.in.h6
-rw-r--r--gl/stdio-impl.h6
-rw-r--r--gl/stdio.in.h23
-rw-r--r--gl/stdlib.in.h40
-rw-r--r--gl/str-two-way.h2
-rw-r--r--gl/strcasecmp.c2
-rw-r--r--gl/strchrnul.c2
-rw-r--r--gl/strdup.c2
-rw-r--r--gl/strerror-override.c7
-rw-r--r--gl/strerror-override.h5
-rw-r--r--gl/strerror.c2
-rw-r--r--gl/string.in.h2
-rw-r--r--gl/strings.in.h2
-rw-r--r--gl/stripslash.c2
-rw-r--r--gl/strncasecmp.c2
-rw-r--r--gl/strndup.c2
-rw-r--r--gl/strnlen.c2
-rw-r--r--gl/strtok_r.c2
-rw-r--r--gl/strverscmp.c2
-rw-r--r--gl/sys_select.in.h23
-rw-r--r--gl/sys_socket.c3
-rw-r--r--gl/sys_socket.in.h11
-rw-r--r--gl/sys_stat.in.h8
-rw-r--r--gl/sys_time.in.h190
-rw-r--r--gl/sys_types.in.h2
-rw-r--r--gl/sys_uio.in.h2
-rw-r--r--gl/sysexits.in.h2
-rw-r--r--gl/tests/Makefile.am13
-rw-r--r--gl/tests/binary-io.c3
-rw-r--r--gl/tests/binary-io.h13
-rw-r--r--gl/tests/fcntl.in.h16
-rw-r--r--gl/tests/fdopen.c2
-rw-r--r--gl/tests/ftruncate.c4
-rw-r--r--gl/tests/getcwd-lgpl.c2
-rw-r--r--gl/tests/getpagesize.c2
-rw-r--r--gl/tests/glthread/lock.c8
-rw-r--r--gl/tests/glthread/lock.h2
-rw-r--r--gl/tests/ignore-value.h2
-rw-r--r--gl/tests/infinity.h2
-rw-r--r--gl/tests/init.sh7
-rw-r--r--gl/tests/inttypes.in.h2
-rw-r--r--gl/tests/ioctl.c4
-rw-r--r--gl/tests/lstat.c4
-rw-r--r--gl/tests/macros.h2
-rw-r--r--gl/tests/malloca.c2
-rw-r--r--gl/tests/malloca.h4
-rw-r--r--gl/tests/minus-zero.h8
-rw-r--r--gl/tests/nan.h2
-rw-r--r--gl/tests/open.c4
-rw-r--r--gl/tests/pathmax.h2
-rw-r--r--gl/tests/perror.c2
-rw-r--r--gl/tests/pipe.c2
-rw-r--r--gl/tests/putenv.c96
-rw-r--r--gl/tests/randomd.c2
-rw-r--r--gl/tests/randoml.c2
-rw-r--r--gl/tests/same-inode.h2
-rw-r--r--gl/tests/setenv.c10
-rw-r--r--gl/tests/signature.h2
-rw-r--r--gl/tests/stat.c5
-rw-r--r--gl/tests/strerror_r.c2
-rw-r--r--gl/tests/symlink.c2
-rw-r--r--gl/tests/sys_ioctl.in.h2
-rw-r--r--gl/tests/test-accept.c4
-rw-r--r--gl/tests/test-alloca-opt.c4
-rwxr-xr-xgl/tests/test-argp-2.sh2
-rw-r--r--gl/tests/test-argp.c2
-rw-r--r--gl/tests/test-arpa_inet.c2
-rw-r--r--gl/tests/test-base64.c2
-rw-r--r--gl/tests/test-binary-io.c2
-rw-r--r--gl/tests/test-bind.c4
-rw-r--r--gl/tests/test-byteswap.c2
-rw-r--r--gl/tests/test-c-ctype.c2
-rw-r--r--gl/tests/test-close.c3
-rw-r--r--gl/tests/test-connect.c4
-rw-r--r--gl/tests/test-dirent.c2
-rw-r--r--gl/tests/test-dup2.c3
-rw-r--r--gl/tests/test-environ.c2
-rw-r--r--gl/tests/test-errno.c2
-rw-r--r--gl/tests/test-fcntl-h.c19
-rw-r--r--gl/tests/test-fdopen.c4
-rw-r--r--gl/tests/test-fgetc.c6
-rw-r--r--gl/tests/test-float.c2
-rw-r--r--gl/tests/test-fprintf-posix.h2
-rw-r--r--gl/tests/test-fputc.c6
-rw-r--r--gl/tests/test-fread.c6
-rw-r--r--gl/tests/test-frexp.c2
-rw-r--r--gl/tests/test-frexp.h2
-rw-r--r--gl/tests/test-frexpl.c2
-rw-r--r--gl/tests/test-fseek.c2
-rw-r--r--gl/tests/test-fseeko.c2
-rw-r--r--gl/tests/test-fseeko3.c2
-rw-r--r--gl/tests/test-fseeko4.c6
-rw-r--r--gl/tests/test-fseterr.c2
-rw-r--r--gl/tests/test-fstat.c4
-rw-r--r--gl/tests/test-ftell.c2
-rw-r--r--gl/tests/test-ftell3.c2
-rw-r--r--gl/tests/test-ftello.c2
-rw-r--r--gl/tests/test-ftello3.c2
-rw-r--r--gl/tests/test-ftello4.c6
-rw-r--r--gl/tests/test-ftruncate.c3
-rw-r--r--gl/tests/test-func.c2
-rw-r--r--gl/tests/test-fwrite.c6
-rw-r--r--gl/tests/test-getaddrinfo.c2
-rw-r--r--gl/tests/test-getcwd-lgpl.c2
-rw-r--r--gl/tests/test-getdelim.c2
-rw-r--r--gl/tests/test-getline.c2
-rw-r--r--gl/tests/test-getopt.c2
-rw-r--r--gl/tests/test-getopt.h2
-rw-r--r--gl/tests/test-getopt_long.h2
-rw-r--r--gl/tests/test-getpeername.c4
-rw-r--r--gl/tests/test-gettimeofday.c2
-rw-r--r--gl/tests/test-ignore-value.c2
-rw-r--r--gl/tests/test-inet_ntop.c2
-rw-r--r--gl/tests/test-inet_pton.c2
-rwxr-xr-xgl/tests/test-init.sh2
-rw-r--r--gl/tests/test-intprops.c2
-rw-r--r--gl/tests/test-inttypes.c2
-rw-r--r--gl/tests/test-ioctl.c4
-rw-r--r--gl/tests/test-isnand-nolibm.c2
-rw-r--r--gl/tests/test-isnand.h2
-rw-r--r--gl/tests/test-isnanf-nolibm.c2
-rw-r--r--gl/tests/test-isnanf.h2
-rw-r--r--gl/tests/test-isnanl-nolibm.c2
-rw-r--r--gl/tests/test-isnanl.h2
-rw-r--r--gl/tests/test-listen.c4
-rw-r--r--gl/tests/test-lstat.c2
-rw-r--r--gl/tests/test-lstat.h2
-rw-r--r--gl/tests/test-malloc-gnu.c2
-rw-r--r--gl/tests/test-malloca.c4
-rw-r--r--gl/tests/test-math.c2
-rw-r--r--gl/tests/test-memchr.c2
-rw-r--r--gl/tests/test-netdb.c2
-rw-r--r--gl/tests/test-netinet_in.c2
-rw-r--r--gl/tests/test-open.c2
-rw-r--r--gl/tests/test-open.h2
-rw-r--r--gl/tests/test-pathmax.c2
-rw-r--r--gl/tests/test-perror.c2
-rw-r--r--gl/tests/test-perror2.c2
-rw-r--r--gl/tests/test-pipe.c2
-rw-r--r--gl/tests/test-printf-frexp.c2
-rw-r--r--gl/tests/test-printf-frexpl.c2
-rw-r--r--gl/tests/test-printf-posix.h2
-rw-r--r--gl/tests/test-rawmemchr.c2
-rw-r--r--gl/tests/test-read-file.c2
-rw-r--r--gl/tests/test-recv.c4
-rw-r--r--gl/tests/test-recvfrom.c4
-rw-r--r--gl/tests/test-select-fd.c2
-rw-r--r--gl/tests/test-select-stdin.c2
-rw-r--r--gl/tests/test-select.c2
-rw-r--r--gl/tests/test-select.h36
-rw-r--r--gl/tests/test-send.c4
-rw-r--r--gl/tests/test-sendto.c4
-rw-r--r--gl/tests/test-setenv.c2
-rw-r--r--gl/tests/test-setsockopt.c4
-rw-r--r--gl/tests/test-shutdown.c4
-rw-r--r--gl/tests/test-signal-h.c2
-rw-r--r--gl/tests/test-signbit.c2
-rw-r--r--gl/tests/test-sleep.c2
-rw-r--r--gl/tests/test-snprintf.c2
-rw-r--r--gl/tests/test-sockets.c2
-rw-r--r--gl/tests/test-stat.c2
-rw-r--r--gl/tests/test-stat.h2
-rw-r--r--gl/tests/test-stdalign.c2
-rw-r--r--gl/tests/test-stdbool.c2
-rw-r--r--gl/tests/test-stddef.c2
-rw-r--r--gl/tests/test-stdint.c2
-rw-r--r--gl/tests/test-stdio.c2
-rw-r--r--gl/tests/test-stdlib.c2
-rw-r--r--gl/tests/test-strchrnul.c2
-rw-r--r--gl/tests/test-strerror.c2
-rw-r--r--gl/tests/test-strerror_r.c2
-rw-r--r--gl/tests/test-string.c2
-rw-r--r--gl/tests/test-strings.c2
-rw-r--r--gl/tests/test-strnlen.c2
-rw-r--r--gl/tests/test-strverscmp.c2
-rw-r--r--gl/tests/test-symlink.c2
-rw-r--r--gl/tests/test-symlink.h2
-rw-r--r--gl/tests/test-sys_ioctl.c2
-rw-r--r--gl/tests/test-sys_select.c2
-rw-r--r--gl/tests/test-sys_socket.c2
-rw-r--r--gl/tests/test-sys_stat.c17
-rw-r--r--gl/tests/test-sys_time.c2
-rw-r--r--gl/tests/test-sys_types.c2
-rw-r--r--gl/tests/test-sys_uio.c2
-rw-r--r--gl/tests/test-sys_wait.h2
-rw-r--r--gl/tests/test-sysexits.c2
-rw-r--r--gl/tests/test-time.c4
-rw-r--r--gl/tests/test-u64.c2
-rw-r--r--gl/tests/test-unistd.c2
-rw-r--r--gl/tests/test-unsetenv.c2
-rw-r--r--gl/tests/test-vasnprintf.c2
-rw-r--r--gl/tests/test-vasprintf.c2
-rwxr-xr-xgl/tests/test-vc-list-files-cvs.sh2
-rwxr-xr-xgl/tests/test-vc-list-files-git.sh2
-rw-r--r--gl/tests/test-verify.c2
-rw-r--r--gl/tests/test-version-etc.c2
-rwxr-xr-xgl/tests/test-version-etc.sh2
-rw-r--r--gl/tests/test-vfprintf-posix.c2
-rw-r--r--gl/tests/test-vprintf-posix.c2
-rw-r--r--gl/tests/test-vsnprintf.c2
-rw-r--r--gl/tests/test-wchar.c2
-rw-r--r--gl/tests/unsetenv.c6
-rw-r--r--gl/tests/w32sock.h2
-rw-r--r--gl/tests/zerosize-ptr.h2
-rw-r--r--gl/time.in.h2
-rw-r--r--gl/time_r.c2
-rw-r--r--gl/timespec.c3
-rw-r--r--gl/timespec.h24
-rw-r--r--gl/u64.c3
-rw-r--r--gl/u64.h29
-rw-r--r--gl/unistd.c3
-rw-r--r--gl/unistd.in.h37
-rw-r--r--gl/vasnprintf.c6
-rw-r--r--gl/vasnprintf.h2
-rw-r--r--gl/vasprintf.c2
-rw-r--r--gl/verify.h8
-rw-r--r--gl/version-etc-fsf.c2
-rw-r--r--gl/version-etc.c4
-rw-r--r--gl/version-etc.h2
-rw-r--r--gl/vfprintf.c2
-rw-r--r--gl/vprintf.c2
-rw-r--r--gl/vsnprintf.c2
-rw-r--r--gl/w32sock.h2
-rw-r--r--gl/wchar.in.h2
-rw-r--r--gl/xsize.c3
-rw-r--r--gl/xsize.h19
-rw-r--r--maint.mk285
557 files changed, 2851 insertions, 2092 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 58f2ead461..8759034e07 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -5,7 +5,7 @@
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
-# Copyright (C) 2001, 2003, 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2006-2013 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
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index 1a07018281..c38b914d6b 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2012 Free Software Foundation, Inc.
+# Copyright 1996-2013 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index c8abd55fb3..e4bfc9fd2b 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,10 +2,10 @@
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-scriptversion=2011-04-08.14
+scriptversion=2013-02-03.15
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+# 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
@@ -30,6 +30,12 @@ scriptversion=2011-04-08.14
#
# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
+# TODO:
+# - image importation was only implemented for HTML generated by
+# makeinfo. But it should be simple enough to adjust.
+# - images are not imported in the source tarball. All the needed
+# formats (PDF, PNG, etc.) should be included.
+
prog=`basename "$0"`
srcdir=`pwd`
@@ -39,38 +45,47 @@ templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/
: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
: ${TEXI2DVI="texi2dvi -t @finalout"}
-: ${DVIPS="dvips"}
: ${DOCBOOK2HTML="docbook2html"}
: ${DOCBOOK2PDF="docbook2pdf"}
-: ${DOCBOOK2PS="docbook2ps"}
: ${DOCBOOK2TXT="docbook2txt"}
: ${GENDOCS_TEMPLATE_DIR="."}
+: ${PERL='perl'}
: ${TEXI2HTML="texi2html"}
unset CDPATH
unset use_texi2html
version="gendocs.sh $scriptversion
-Copyright 2010 Free Software Foundation, Inc.
+Copyright 2013 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
-Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source.
-See the GNU Maintainers document for a more extensive discussion:
+Generate output in various formats from PACKAGE.texinfo (or .texi or
+.txi) source. See the GNU Maintainers document for a more extensive
+discussion:
http://www.gnu.org/prep/maintain_toc.html
Options:
- -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
- -o OUTDIR write files into OUTDIR, instead of manual/.
- --email ADR use ADR as contact in generated web pages.
- --docbook convert to DocBook too (xml, txt, html, pdf and ps).
- --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets.
- --texi2html use texi2html to generate HTML targets.
- --help display this help and exit successfully.
- --version display version information and exit successfully.
+ --email ADR use ADR as contact in generated web pages; always give this.
+
+ -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
+ -o OUTDIR write files into OUTDIR, instead of manual/.
+ -I DIR append DIR to the Texinfo search path.
+ --common ARG pass ARG in all invocations.
+ --html ARG pass ARG to makeinfo or texi2html for HTML targets.
+ --info ARG pass ARG to makeinfo for Info, instead of --no-split.
+ --no-ascii skip generating the plain text output.
+ --source ARG include ARG in tar archive of sources.
+ --split HOW make split HTML by node, section, chapter; default node.
+
+ --texi2html use texi2html to make HTML target, with all split versions.
+ --docbook convert through DocBook too (xml, txt, html, pdf).
+
+ --help display this help and exit successfully.
+ --version display version information and exit successfully.
Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
@@ -80,12 +95,12 @@ Typical sequence:
wget \"$templateurl\"
$prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
-Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR
-to override). Move all the new files into your web CVS tree, as
-explained in the Web Pages node of maintain.texi.
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override). Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
-Please use the --email ADDRESS option to specify your bug-reporting
-address in the generated HTML pages.
+Please use the --email ADDRESS option so your own bug-reporting
+address will be used in the generated HTML pages.
MANUAL-TITLE is included as part of the HTML <title> of the overall
manual/index.html file. It should include the name of the package being
@@ -102,11 +117,14 @@ If a manual's Texinfo sources are spread across several directories,
first copy or symlink all Texinfo sources into a single directory.
(Part of the script's work is to make a tar.gz of the sources.)
-You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and
-DVIPS to control the programs that get executed, and
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
+You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
+and PERL to control the programs that get executed, and
GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
looked for. With --docbook, the environment variables DOCBOOK2HTML,
-DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected.
+DOCBOOK2PDF, and DOCBOOK2TXT are also consulted.
By default, makeinfo and texi2dvi are run in the default (English)
locale, since that's the language of most Texinfo manuals. If you
@@ -116,29 +134,37 @@ SETLANG setting in the source.
Email bug reports or enhancement requests to bug-texinfo@gnu.org.
"
-calcsize()
-{
- size=`ls -ksl $1 | awk '{print $1}'`
- echo $size
-}
-
MANUAL_TITLE=
PACKAGE=
EMAIL=webmasters@gnu.org # please override with --email
+commonarg= # passed to all makeinfo/texi2html invcations.
+dirargs= # passed to all tools (-I dir).
+dirs= # -I's directories.
htmlarg=
+infoarg=--no-split
+generate_ascii=true
outdir=manual
+source_extra=
+split=node
srcfile=
while test $# -gt 0; do
case $1 in
- --email) shift; EMAIL=$1;;
- --help) echo "$usage"; exit 0;;
- --version) echo "$version"; exit 0;;
- -s) shift; srcfile=$1;;
- -o) shift; outdir=$1;;
- --docbook) docbook=yes;;
- --html) shift; htmlarg=$1;;
+ -s) shift; srcfile=$1;;
+ -o) shift; outdir=$1;;
+ -I) shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
+ --common) shift; commonarg=$1;;
+ --docbook) docbook=yes;;
+ --email) shift; EMAIL=$1;;
+ --html) shift; htmlarg=$1;;
+ --info) shift; infoarg=$1;;
+ --no-ascii) generate_ascii=false;;
+ --source) shift; source_extra=$1;;
+ --split) shift; split=$1;;
--texi2html) use_texi2html=1;;
+
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
-*)
echo "$0: Unknown option \`$1'." >&2
echo "$0: Try \`--help' for more information." >&2
@@ -156,6 +182,9 @@ while test $# -gt 0; do
shift
done
+# makeinfo uses the dirargs, but texi2dvi doesn't.
+commonarg=" $dirargs $commonarg"
+
# For most of the following, the base name is just $PACKAGE
base=$PACKAGE
@@ -183,57 +212,106 @@ if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
exit 1
fi
+# Function to return size of $1 in something resembling kilobytes.
+calcsize()
+{
+ size=`ls -ksl $1 | awk '{print $1}'`
+ echo $size
+}
+
+# copy_images OUTDIR HTML-FILE...
+# -------------------------------
+# Copy all the images needed by the HTML-FILEs into OUTDIR. Look
+# for them in the -I directories.
+copy_images()
+{
+ local odir
+ odir=$1
+ shift
+ $PERL -n -e "
+BEGIN {
+ \$me = '$prog';
+ \$odir = '$odir';
+ @dirs = qw($dirs);
+}
+" -e '
+/<img src="(.*?)"/g && ++$need{$1};
+
+END {
+ #print "$me: @{[keys %need]}\n"; # for debugging, show images found.
+ FILE: for my $f (keys %need) {
+ for my $d (@dirs) {
+ if (-f "$d/$f") {
+ use File::Basename;
+ my $dest = dirname ("$odir/$f");
+ #
+ use File::Path;
+ -d $dest || mkpath ($dest)
+ || die "$me: cannot mkdir $dest: $!\n";
+ #
+ use File::Copy;
+ copy ("$d/$f", $dest)
+ || die "$me: cannot copy $d/$f to $dest: $!\n";
+ next FILE;
+ }
+ }
+ die "$me: $ARGV: cannot find image $f\n";
+ }
+}
+' -- "$@" || exit 1
+}
+
case $outdir in
/*) abs_outdir=$outdir;;
*) abs_outdir=$srcdir/$outdir;;
esac
-echo Generating output formats for $srcfile
+echo "Making output for $srcfile"
+echo " in `pwd`"
+mkdir -p "$outdir/"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
-echo "Generating info files... ($cmd)"
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+echo "Generating info... ($cmd)"
eval "$cmd"
-mkdir -p "$outdir/"
tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
+ls -l "$outdir/$PACKAGE.info.tar.gz"
info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
# do not mv the info files, there's no point in having them available
# separately on the web.
-cmd="$SETLANG ${TEXI2DVI} \"$srcfile\""
-echo "Generating dvi ... ($cmd)"
+cmd="$SETLANG $TEXI2DVI $dirargs \"$srcfile\""
+printf "\nGenerating dvi... ($cmd)\n"
eval "$cmd"
-
-# now, before we compress dvi:
-echo Generating postscript...
-${DVIPS} $PACKAGE -o
-gzip -f -9 $PACKAGE.ps
-ps_gz_size=`calcsize $PACKAGE.ps.gz`
-mv $PACKAGE.ps.gz "$outdir/"
-
# compress/finish dvi:
gzip -f -9 $PACKAGE.dvi
dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
mv $PACKAGE.dvi.gz "$outdir/"
+ls -l "$outdir/$PACKAGE.dvi.gz"
-cmd="$SETLANG ${TEXI2DVI} --pdf \"$srcfile\""
-echo "Generating pdf ... ($cmd)"
+cmd="$SETLANG $TEXI2DVI --pdf $dirargs \"$srcfile\""
+printf "\nGenerating pdf... ($cmd)\n"
eval "$cmd"
pdf_size=`calcsize $PACKAGE.pdf`
mv $PACKAGE.pdf "$outdir/"
+ls -l "$outdir/$PACKAGE.pdf"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
-echo "Generating ASCII... ($cmd)"
-eval "$cmd"
-ascii_size=`calcsize $PACKAGE.txt`
-gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
-ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
-mv $PACKAGE.txt "$outdir/"
+if $generate_ascii; then
+ opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating ascii... ($cmd)\n"
+ eval "$cmd"
+ ascii_size=`calcsize $PACKAGE.txt`
+ gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
+ ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
+ mv $PACKAGE.txt "$outdir/"
+ ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
+fi
html_split()
{
- opt="--split=$1 $htmlarg --node-files"
+ opt="--split=$1 --node-files $commonarg $htmlarg"
cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
- echo "Generating html by $1... ($cmd)"
+ printf "\nGenerating html by $1... ($cmd)\n"
eval "$cmd"
split_html_dir=$PACKAGE.html
(
@@ -249,32 +327,39 @@ html_split()
}
if test -z "$use_texi2html"; then
- opt="--no-split --html -o $PACKAGE.html $htmlarg"
+ opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
- echo "Generating monolithic html... ($cmd)"
+ printf "\nGenerating monolithic html... ($cmd)\n"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
html_mono_size=`calcsize $PACKAGE.html`
gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ copy_images "$outdir/" $PACKAGE.html
mv $PACKAGE.html "$outdir/"
+ ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
- cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\""
- echo "Generating html by node... ($cmd)"
+ opt="--html -o $PACKAGE.html --split=$split $commonarg $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating html by $split... ($cmd)\n"
eval "$cmd"
split_html_dir=$PACKAGE.html
+ copy_images $split_html_dir/ $split_html_dir/*.html
(
- cd ${split_html_dir} || exit 1
- tar -czf "$abs_outdir/${PACKAGE}.html_node.tar.gz" -- *.html
+ cd $split_html_dir || exit 1
+ tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- *
)
- html_node_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node.tar.gz"`
- rm -f "$outdir"/html_node/*.html
- mkdir -p "$outdir/html_node/"
- mv ${split_html_dir}/*.html "$outdir/html_node/"
- rmdir ${split_html_dir}
-else
- cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\""
- echo "Generating monolithic html... ($cmd)"
+ eval \
+ html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
+ rm -rf "$outdir/html_$split/"
+ mv $split_html_dir "$outdir/html_$split/"
+ du -s "$outdir/html_$split/"
+ ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
+
+else # use texi2html:
+ opt="--output $PACKAGE.html $commonarg $htmlarg"
+ cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
+ printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
html_mono_size=`calcsize $PACKAGE.html`
@@ -287,18 +372,20 @@ else
html_split section
fi
-echo Making .tar.gz for sources...
+printf "\nMaking .tar.gz for sources...\n"
d=`dirname $srcfile`
(
cd "$d"
- srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true
- tar cvzfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
+ srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true
+ tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
+ ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
)
texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
if test -n "$docbook"; then
- cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
- echo "Generating docbook XML... ($cmd)"
+ opt="-o - --docbook $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
+ printf "\nGenerating docbook XML... ($cmd)\n"
eval "$cmd"
docbook_xml_size=`calcsize $PACKAGE-db.xml`
gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
@@ -306,8 +393,9 @@ if test -n "$docbook"; then
mv $PACKAGE-db.xml "$outdir/"
split_html_db_dir=html_node_db
- cmd="${DOCBOOK2HTML} -o $split_html_db_dir \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook HTML... ($cmd)"
+ opt="$commonarg -o $split_html_db_dir"
+ cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook HTML... ($cmd)\n"
eval "$cmd"
(
cd ${split_html_db_dir} || exit 1
@@ -319,33 +407,28 @@ if test -n "$docbook"; then
mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
rmdir ${split_html_db_dir}
- cmd="${DOCBOOK2TXT} \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook ASCII... ($cmd)"
+ cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook ASCII... ($cmd)\n"
eval "$cmd"
docbook_ascii_size=`calcsize $PACKAGE-db.txt`
mv $PACKAGE-db.txt "$outdir/"
- cmd="${DOCBOOK2PS} \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook PS... ($cmd)"
- eval "$cmd"
- gzip -f -9 -c $PACKAGE-db.ps >"$outdir/$PACKAGE-db.ps.gz"
- docbook_ps_gz_size=`calcsize "$outdir/$PACKAGE-db.ps.gz"`
- mv $PACKAGE-db.ps "$outdir/"
-
- cmd="${DOCBOOK2PDF} \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook PDF... ($cmd)"
+ cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook PDF... ($cmd)\n"
eval "$cmd"
docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
mv $PACKAGE-db.pdf "$outdir/"
fi
-echo "Writing index file..."
+printf "\nMaking index file...\n"
if test -z "$use_texi2html"; then
- CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
- /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
+ CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
+ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
else
- CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
+ # should take account of --split here.
+ CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
fi
+
curdate=`$SETLANG date '+%B %d, %Y'`
sed \
-e "s!%%TITLE%%!$MANUAL_TITLE!g" \
@@ -360,13 +443,11 @@ sed \
-e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
-e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
-e "s!%%PDF_SIZE%%!$pdf_size!g" \
- -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \
-e "s!%%ASCII_SIZE%%!$ascii_size!g" \
-e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
-e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
-e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
-e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
- -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \
-e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
-e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
-e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index 7cf8df7e47..863c73e939 100644
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -1,6 +1,6 @@
# pmccabe2html - AWK script to convert pmccabe output to html -*- awk -*-
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2013 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
diff --git a/build-aux/snippet/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h
index 3a9dd2664e..8ea2a4747e 100644
--- a/build-aux/snippet/arg-nonnull.h
+++ b/build-aux/snippet/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h
index 96da94b97b..b35b933cd6 100644
--- a/build-aux/snippet/c++defs.h
+++ b/build-aux/snippet/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 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
diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h
index d4cb94f352..1736a1bd7a 100644
--- a/build-aux/snippet/warn-on-use.h
+++ b/build-aux/snippet/warn-on-use.h
@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 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
@@ -55,7 +55,7 @@
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
#if HAVE_RAW_DECL_ENVIRON
- static inline char ***rpl_environ (void) { return &environ; }
+ static char ***rpl_environ (void) { return &environ; }
_GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
# undef environ
# define environ (*rpl_environ ())
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index 2b646308ec..663347a3a9 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -10,7 +10,7 @@ my $VERSION = '2012-01-06 07:23'; # UTC
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2013 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
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index d477da8e9e..7ec335fbd2 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -4,7 +4,7 @@
# Print a version string.
scriptversion=2011-05-16.22; # UTC
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 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
diff --git a/doc/gendocs_template b/doc/gendocs_template
index 0144603c77..739d69d645 100644
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -45,8 +45,6 @@
(%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
(%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
-<li><a href="%%PACKAGE%%.ps.gz">PostScript file
- (%%PS_GZ_SIZE%%K bytes gzipped)</a>.</li>
<li><a href="%%PACKAGE%%.pdf">PDF file
(%%PDF_SIZE%%K bytes)</a>.</li>
<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
@@ -84,7 +82,7 @@ the FSF.<br />
Please send broken links and other corrections or suggestions to
<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
-<p>Copyright &copy; 2012 Free Software Foundation, Inc.</p>
+<p>Copyright &copy; 2013 Free Software Foundation, Inc.</p>
<p>Verbatim copying and distribution of this entire article are
permitted worldwide, without royalty, in any medium, provided this
diff --git a/gl/Makefile.am b/gl/Makefile.am
index a492e6a032..294c842b8b 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -294,6 +294,15 @@ EXTRA_DIST += dosname.h
## end gnulib module dosname
+## begin gnulib module dup2
+
+
+EXTRA_DIST += dup2.c
+
+EXTRA_libgnu_la_SOURCES += dup2.c
+
+## end gnulib module dup2
+
## begin gnulib module errno
BUILT_SOURCES += $(ERRNO_H)
@@ -428,9 +437,10 @@ EXTRA_libgnu_la_SOURCES += fseeko.c
## begin gnulib module fseterr
-libgnu_la_SOURCES += fseterr.c
-EXTRA_DIST += fseterr.h stdio-impl.h
+EXTRA_DIST += fseterr.c fseterr.h stdio-impl.h
+
+EXTRA_libgnu_la_SOURCES += fseterr.c
## end gnulib module fseterr
@@ -590,7 +600,7 @@ EXTRA_libgnu_la_SOURCES += gettimeofday.c
distclean-local: clean-GNUmakefile
clean-GNUmakefile:
- test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+ test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
EXTRA_DIST += $(top_srcdir)/GNUmakefile
@@ -700,6 +710,7 @@ EXTRA_libgnu_la_SOURCES += malloc.c
## begin gnulib module math
BUILT_SOURCES += math.h
+libgnu_la_SOURCES += math.c
# We need the following in order to create <math.h> when the system
# doesn't have one that works with the given compiler.
@@ -1736,6 +1747,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
-e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
-e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
-e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
-e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
-e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
@@ -1764,6 +1776,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
-e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
-e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
@@ -1777,6 +1790,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
@@ -2047,6 +2061,7 @@ EXTRA_DIST += sys_select.in.h
## begin gnulib module sys_socket
BUILT_SOURCES += sys/socket.h
+libgnu_la_SOURCES += sys_socket.c
# We need the following in order to create <sys/socket.h> when the system
# doesn't have one that works with the given compiler.
@@ -2332,6 +2347,7 @@ EXTRA_libgnu_la_SOURCES += time_r.c
## begin gnulib module timespec
+libgnu_la_SOURCES += timespec.c
EXTRA_DIST += timespec.h
@@ -2339,6 +2355,7 @@ EXTRA_DIST += timespec.h
## begin gnulib module u64
+libgnu_la_SOURCES += u64.c
EXTRA_DIST += u64.h
@@ -2347,6 +2364,7 @@ EXTRA_DIST += u64.h
## begin gnulib module unistd
BUILT_SOURCES += unistd.h
+libgnu_la_SOURCES += unistd.c
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
@@ -2695,7 +2713,7 @@ EXTRA_DIST += wchar.in.h
## begin gnulib module xsize
-libgnu_la_SOURCES += xsize.h
+libgnu_la_SOURCES += xsize.h xsize.c
## end gnulib module xsize
diff --git a/gl/accept.c b/gl/accept.c
index 8775aaee2d..bf27403d45 100644
--- a/gl/accept.c
+++ b/gl/accept.c
@@ -1,6 +1,6 @@
/* accept.c --- wrappers for Windows accept function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/alloca.in.h b/gl/alloca.in.h
index e94eb68c3c..72d28ee306 100644
--- a/gl/alloca.in.h
+++ b/gl/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2013 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
@@ -44,6 +44,13 @@
# define alloca _alloca
# elif defined __DECC && defined __VMS
# define alloca __ALLOCA
+# elif defined __TANDEM && defined _TNS_E_TARGET
+# ifdef __cplusplus
+extern "C"
+# endif
+void *_alloca (unsigned short);
+# pragma intrinsic (_alloca)
+# define alloca _alloca
# else
# include <stddef.h>
# ifdef __cplusplus
diff --git a/gl/alphasort.c b/gl/alphasort.c
index 4dc6790a3b..0cf8d1167c 100644
--- a/gl/alphasort.c
+++ b/gl/alphasort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997-1998, 2009-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997-1998, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify it
diff --git a/gl/argp-ba.c b/gl/argp-ba.c
index 0b3d0bdb04..5abc9d00a1 100644
--- a/gl/argp-ba.c
+++ b/gl/argp-ba.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
- Copyright (C) 1996-1997, 1999, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1996-1997, 1999, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -23,7 +23,7 @@
ADDR." */
const char *argp_program_bug_address
/* This variable should be zero-initialized. On most systems, putting it into
- BSS is sufficient. Not so on MacOS X 10.3 and 10.4, see
+ BSS is sufficient. Not so on Mac OS X 10.3 and 10.4, see
<http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>
<http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00096.html>. */
#if defined __ELF__
diff --git a/gl/argp-eexst.c b/gl/argp-eexst.c
index dcb10a6f70..a8bb77fcf7 100644
--- a/gl/argp-eexst.c
+++ b/gl/argp-eexst.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_ERR_EXIT_STATUS
- Copyright (C) 1997, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/argp-fmtstream.c b/gl/argp-fmtstream.c
index 70e3eb8627..7aa317c44c 100644
--- a/gl/argp-fmtstream.c
+++ b/gl/argp-fmtstream.c
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams
- Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2012 Free Software
+ Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/argp-fmtstream.h b/gl/argp-fmtstream.h
index a891c3dc0b..000090ea68 100644
--- a/gl/argp-fmtstream.h
+++ b/gl/argp-fmtstream.h
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams.
- Copyright (C) 1997, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2006-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -133,7 +133,7 @@ extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
const char *__fmt, ...)
_GL_ATTRIBUTE_FORMAT ((printf, 2, 3));
-#if _LIBC || !defined __OPTIMIZE__
+#if _LIBC
extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
@@ -154,7 +154,7 @@ extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
-#if _LIBC || !defined __OPTIMIZE__
+#if _LIBC
/* Set __FS's left margin to LMARGIN and return the old value. */
extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
size_t __lmargin);
@@ -184,7 +184,7 @@ extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
-#ifdef __OPTIMIZE__
+#if !_LIBC || defined __OPTIMIZE__
/* Inline versions of above routines. */
#if !_LIBC
@@ -197,6 +197,10 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
#define __argp_fmtstream_point argp_fmtstream_point
#define __argp_fmtstream_update _argp_fmtstream_update
#define __argp_fmtstream_ensure _argp_fmtstream_ensure
+_GL_INLINE_HEADER_BEGIN
+#ifndef ARGP_FS_EI
+# define ARGP_FS_EI _GL_INLINE
+#endif
#endif
#ifndef ARGP_FS_EI
@@ -345,9 +349,10 @@ __argp_fmtstream_point (argp_fmtstream_t __fs)
#undef __argp_fmtstream_point
#undef __argp_fmtstream_update
#undef __argp_fmtstream_ensure
+_GL_INLINE_HEADER_END
#endif
-#endif /* __OPTIMIZE__ */
+#endif /* !_LIBC || __OPTIMIZE__ */
#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
diff --git a/gl/argp-fs-xinl.c b/gl/argp-fs-xinl.c
index b030e589f6..35547d93d4 100644
--- a/gl/argp-fs-xinl.c
+++ b/gl/argp-fs-xinl.c
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp-fmtstream.h
- Copyright (C) 1997, 2003-2004, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003-2004, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -20,7 +20,11 @@
# include <config.h>
#endif
-#define ARGP_FS_EI
+#ifdef _LIBC
+# define ARGP_FS_EI
+#else
+# define ARGP_FS_EI _GL_EXTERN_INLINE
+#endif
#undef __OPTIMIZE__
#define __OPTIMIZE__ 1
#include "argp-fmtstream.h"
diff --git a/gl/argp-help.c b/gl/argp-help.c
index a126acb9ba..354f1e22f5 100644
--- a/gl/argp-help.c
+++ b/gl/argp-help.c
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing help output
- Copyright (C) 1995-2005, 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995-2005, 2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -29,6 +29,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <assert.h>
#include <stdarg.h>
#include <ctype.h>
diff --git a/gl/argp-namefrob.h b/gl/argp-namefrob.h
index a6df978af6..6333958c63 100644
--- a/gl/argp-namefrob.h
+++ b/gl/argp-namefrob.h
@@ -1,5 +1,5 @@
/* Name frobnication for compiling argp outside of glibc
- Copyright (C) 1997, 2003, 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003, 2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/argp-parse.c b/gl/argp-parse.c
index 3b411d407b..489d6de91c 100644
--- a/gl/argp-parse.c
+++ b/gl/argp-parse.c
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt
- Copyright (C) 1995-2000, 2002-2004, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2002-2004, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -880,11 +880,11 @@ __argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
#ifndef _LIBC
if (!(flags & ARGP_PARSE_ARGV0))
{
-#ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
if (!program_invocation_name)
program_invocation_name = argv[0];
#endif
-#ifdef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
if (!program_invocation_short_name)
program_invocation_short_name = __argp_base_name (argv[0]);
#endif
diff --git a/gl/argp-pin.c b/gl/argp-pin.c
index aab8160518..78cbb355b7 100644
--- a/gl/argp-pin.c
+++ b/gl/argp-pin.c
@@ -1,5 +1,5 @@
/* Full and short program names for argp module
- Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2013 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
diff --git a/gl/argp-pv.c b/gl/argp-pv.c
index 1d5a010c9b..c74070d124 100644
--- a/gl/argp-pv.c
+++ b/gl/argp-pv.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION.
- Copyright (C) 1996-1997, 1999, 2006, 2009-2012 Free Software Foundation,
+ Copyright (C) 1996-1997, 1999, 2006, 2009-2013 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -23,7 +23,7 @@
ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
const char *argp_program_version
/* This variable should be zero-initialized. On most systems, putting it into
- BSS is sufficient. Not so on MacOS X 10.3 and 10.4, see
+ BSS is sufficient. Not so on Mac OS X 10.3 and 10.4, see
<http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>
<http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00096.html>. */
#if defined __ELF__
diff --git a/gl/argp-pvh.c b/gl/argp-pvh.c
index 5c858b3b4f..885ff4b75b 100644
--- a/gl/argp-pvh.c
+++ b/gl/argp-pvh.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
- Copyright (C) 1996-1997, 1999, 2004, 2009-2012 Free Software Foundation,
+ Copyright (C) 1996-1997, 1999, 2004, 2009-2013 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/argp-xinl.c b/gl/argp-xinl.c
index 7d45fcb62a..04d8cf7035 100644
--- a/gl/argp-xinl.c
+++ b/gl/argp-xinl.c
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp.h
- Copyright (C) 1997-1998, 2004, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2004, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -27,7 +27,11 @@
#ifndef __USE_EXTERN_INLINES
# define __USE_EXTERN_INLINES 1
#endif
-#define ARGP_EI
+#ifdef _LIBC
+# define ARGP_EI
+#else
+# define ARGP_EI _GL_EXTERN_INLINE
+#endif
#undef __OPTIMIZE__
#define __OPTIMIZE__ 1
#include "argp.h"
diff --git a/gl/argp.h b/gl/argp.h
index c0c68a61e7..c4094a40c3 100644
--- a/gl/argp.h
+++ b/gl/argp.h
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt.
- Copyright (C) 1995-1999, 2003-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2003-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -519,7 +519,7 @@ extern void __argp_state_help (const struct argp_state *__restrict __state,
FILE *__restrict __stream,
unsigned int __flags);
-#if _LIBC || !defined __USE_EXTERN_INLINES
+#if _LIBC
/* Possibly output the standard usage message for ARGP to stderr and exit. */
extern void argp_usage (const struct argp_state *__state);
extern void __argp_usage (const struct argp_state *__state);
@@ -552,7 +552,7 @@ extern void __argp_failure (const struct argp_state *__restrict __state,
const char *__restrict __fmt, ...)
_GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
-#if _LIBC || !defined __USE_EXTERN_INLINES
+#if _LIBC
/* Returns true if the option OPT is a valid short option. */
extern int _option_is_short (const struct argp_option *__opt) __THROW;
extern int __option_is_short (const struct argp_option *__opt) __THROW;
@@ -572,13 +572,17 @@ extern void *__argp_input (const struct argp *__restrict __argp,
const struct argp_state *__restrict __state)
__THROW;
-#ifdef __USE_EXTERN_INLINES
+#if !_LIBC || defined __USE_EXTERN_INLINES
# if !_LIBC
# define __argp_usage argp_usage
# define __argp_state_help argp_state_help
# define __option_is_short _option_is_short
# define __option_is_end _option_is_end
+_GL_INLINE_HEADER_BEGIN
+# ifndef ARGP_EI
+# define ARGP_EI _GL_INLINE
+# endif
# endif
# ifndef ARGP_EI
@@ -635,6 +639,7 @@ __NTH (__option_is_end (const struct argp_option *__opt))
# undef __argp_state_help
# undef __option_is_short
# undef __option_is_end
+_GL_INLINE_HEADER_END
# endif
#endif /* Use extern inlines. */
diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h
index 0b8f1f1174..ba89e9776e 100644
--- a/gl/arpa_inet.in.h
+++ b/gl/arpa_inet.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>.
- Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2013 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
diff --git a/gl/asnprintf.c b/gl/asnprintf.c
index f6f70c9288..76e228d860 100644
--- a/gl/asnprintf.c
+++ b/gl/asnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2013 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
diff --git a/gl/asprintf.c b/gl/asprintf.c
index 1722436c31..713dae132f 100644
--- a/gl/asprintf.c
+++ b/gl/asprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007, 2009-2012 Free Software Foundation,
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2013 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/base64.c b/gl/base64.c
index 351c5fd776..8da969c0f6 100644
--- a/gl/base64.c
+++ b/gl/base64.c
@@ -1,5 +1,5 @@
/* base64.c -- Encode binary data using printable characters.
- Copyright (C) 1999-2001, 2004-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2001, 2004-2006, 2009-2013 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
@@ -53,7 +53,7 @@
#include <string.h>
/* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
to_uchar (char ch)
{
return ch;
@@ -314,7 +314,7 @@ base64_decode_ctx_init (struct base64_decode_context *ctx)
and return CTX->buf. In either case, advance *IN to point to the byte
after the last one processed, and set *N_NON_NEWLINE to the number of
verified non-newline bytes accessible through the returned pointer. */
-static inline char *
+static char *
get_4 (struct base64_decode_context *ctx,
char const *restrict *in, char const *restrict in_end,
size_t *n_non_newline)
@@ -368,7 +368,7 @@ get_4 (struct base64_decode_context *ctx,
as many bytes as possible are written to *OUT. On return, advance
*OUT to point to the byte after the last one written, and decrement
*OUTLEN to reflect the number of bytes remaining in *OUT. */
-static inline bool
+static bool
decode_4 (char const *restrict in, size_t inlen,
char *restrict *outp, size_t *outleft)
{
diff --git a/gl/base64.h b/gl/base64.h
index dc6f2a4f12..343150cb53 100644
--- a/gl/base64.h
+++ b/gl/base64.h
@@ -1,5 +1,5 @@
/* base64.h -- Encode binary data using printable characters.
- Copyright (C) 2004-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,10 @@
/* Get bool. */
# include <stdbool.h>
+# ifdef __cplusplus
+extern "C" {
+# endif
+
/* This uses that the expression (n+(k-1))/k means the smallest
integer >= n/k, i.e., the ceiling of n/k. */
# define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
@@ -57,4 +61,8 @@ extern bool base64_decode_alloc_ctx (struct base64_decode_context *ctx,
#define base64_decode_alloc(in, inlen, out, outlen) \
base64_decode_alloc_ctx (NULL, in, inlen, out, outlen)
+# ifdef __cplusplus
+}
+# endif
+
#endif /* BASE64_H */
diff --git a/gl/basename-lgpl.c b/gl/basename-lgpl.c
index 43ef8c211b..9307e83142 100644
--- a/gl/basename-lgpl.c
+++ b/gl/basename-lgpl.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2012 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/bind.c b/gl/bind.c
index 0045c9dc7f..e6edb8551f 100644
--- a/gl/bind.c
+++ b/gl/bind.c
@@ -1,6 +1,6 @@
/* bind.c --- wrappers for Windows bind function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/byteswap.in.h b/gl/byteswap.in.h
index e356699a4d..a323ca3570 100644
--- a/gl/byteswap.in.h
+++ b/gl/byteswap.in.h
@@ -1,5 +1,5 @@
/* byteswap.h - Byte swapping
- Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/c-ctype.c b/gl/c-ctype.c
index 952d7a851f..752d2e32ae 100644
--- a/gl/c-ctype.c
+++ b/gl/c-ctype.c
@@ -1,6 +1,6 @@
/* Character handling in C locale.
- Copyright 2000-2003, 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright 2000-2003, 2006, 2009-2013 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
diff --git a/gl/c-ctype.h b/gl/c-ctype.h
index 0b31309e96..3a66440ae9 100644
--- a/gl/c-ctype.h
+++ b/gl/c-ctype.h
@@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2013 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
diff --git a/gl/close.c b/gl/close.c
index 4b7accbc96..f620e54bba 100644
--- a/gl/close.c
+++ b/gl/close.c
@@ -1,5 +1,5 @@
/* close replacement.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/closedir.c b/gl/closedir.c
index df31e86b4e..fa8e210633 100644
--- a/gl/closedir.c
+++ b/gl/closedir.c
@@ -1,5 +1,5 @@
/* Stop reading the entries of a directory.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 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
diff --git a/gl/connect.c b/gl/connect.c
index 939b399afe..04cd5a262e 100644
--- a/gl/connect.c
+++ b/gl/connect.c
@@ -1,6 +1,6 @@
/* connect.c --- wrappers for Windows connect function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/dirent-private.h b/gl/dirent-private.h
index b60203c4b9..441071ca0a 100644
--- a/gl/dirent-private.h
+++ b/gl/dirent-private.h
@@ -1,5 +1,5 @@
/* Private details of the DIR type.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/dirent.in.h b/gl/dirent.in.h
index cdbc5fd4fd..fad3797b8b 100644
--- a/gl/dirent.in.h
+++ b/gl/dirent.in.h
@@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 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
diff --git a/gl/dirname-lgpl.c b/gl/dirname-lgpl.c
index 2895cbcb28..82f66301f2 100644
--- a/gl/dirname-lgpl.c
+++ b/gl/dirname-lgpl.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2012 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/dirname.h b/gl/dirname.h
index 51a685c3a4..4ad0312008 100644
--- a/gl/dirname.h
+++ b/gl/dirname.h
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2012 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/dosname.h b/gl/dosname.h
index 0468ce4dc8..ba63ce4bd3 100644
--- a/gl/dosname.h
+++ b/gl/dosname.h
@@ -1,6 +1,6 @@
/* File names on MS-DOS/Windows systems.
- Copyright (C) 2000-2001, 2004-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2004-2006, 2009-2013 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
diff --git a/gl/tests/dup2.c b/gl/dup2.c
index f6d0f1c73c..9219eb3823 100644
--- a/gl/tests/dup2.c
+++ b/gl/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2013 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
@@ -95,7 +95,10 @@ rpl_dup2 (int fd, int desired_fd)
# ifdef F_GETFL
/* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
On Cygwin 1.5.x, dup2 (1, 1) returns 0.
+ On Cygwin 1.7.17, dup2 (1, -1) dumps core.
On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */
+ if (desired_fd < 0)
+ fd = desired_fd;
if (fd == desired_fd)
return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
# endif
diff --git a/gl/errno.in.h b/gl/errno.in.h
index 5e5af9276e..49b35464b9 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
@@ -270,5 +270,10 @@
# define GNULIB_defined_ENOTRECOVERABLE 1
# endif
+# ifndef EILSEQ
+# define EILSEQ 2015
+# define GNULIB_defined_EILSEQ 1
+# endif
+
#endif /* _@GUARD_PREFIX@_ERRNO_H */
#endif /* _@GUARD_PREFIX@_ERRNO_H */
diff --git a/gl/error.c b/gl/error.c
index dc8c65fa7f..865b29340b 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -121,7 +121,7 @@ extern char *program_name;
#if !_LIBC
/* Return non-zero if FD is open. */
-static inline int
+static int
is_open (int fd)
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@@ -139,7 +139,7 @@ is_open (int fd)
}
#endif
-static inline void
+static void
flush_stdout (void)
{
#if !_LIBC
diff --git a/gl/error.h b/gl/error.h
index 9c2cb8bc6a..afcb0e10c8 100644
--- a/gl/error.h
+++ b/gl/error.h
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function
- Copyright (C) 1995-1997, 2003, 2006, 2008-2012 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2013 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
diff --git a/gl/fd-hook.c b/gl/fd-hook.c
index 8f4ffe2a8d..e158a52aa3 100644
--- a/gl/fd-hook.c
+++ b/gl/fd-hook.c
@@ -1,5 +1,5 @@
/* Hook for making making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it
diff --git a/gl/fd-hook.h b/gl/fd-hook.h
index 721e9ad931..d15b577114 100644
--- a/gl/fd-hook.h
+++ b/gl/fd-hook.h
@@ -1,5 +1,5 @@
/* Hook for making making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/filename.h b/gl/filename.h
index 7b89d0d06b..b82a0ac389 100644
--- a/gl/filename.h
+++ b/gl/filename.h
@@ -1,5 +1,5 @@
/* Basic filename support macros.
- Copyright (C) 2001-2004, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2007-2013 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
diff --git a/gl/float+.h b/gl/float+.h
index 75e56a1219..32fb790bb5 100644
--- a/gl/float+.h
+++ b/gl/float+.h
@@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/float.c b/gl/float.c
index ea31866548..366945fa38 100644
--- a/gl/float.c
+++ b/gl/float.c
@@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/float.in.h b/gl/float.in.h
index b4205103be..84e1950f95 100644
--- a/gl/float.in.h
+++ b/gl/float.in.h
@@ -1,6 +1,6 @@
/* A correct <float.h>.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/fpucw.h b/gl/fpucw.h
index 23e4c81411..0b7f5284a1 100644
--- a/gl/fpucw.h
+++ b/gl/fpucw.h
@@ -1,5 +1,5 @@
/* Manipulating the FPU control word.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/frexp.c b/gl/frexp.c
index 4f5d0c03e8..d847fa38b3 100644
--- a/gl/frexp.c
+++ b/gl/frexp.c
@@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/frexpl.c b/gl/frexpl.c
index b74ceeb56f..5ec2780ed4 100644
--- a/gl/frexpl.c
+++ b/gl/frexpl.c
@@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/fseek.c b/gl/fseek.c
index 20f5e2c972..4708287c30 100644
--- a/gl/fseek.c
+++ b/gl/fseek.c
@@ -1,5 +1,5 @@
/* An fseek() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/fseeko.c b/gl/fseeko.c
index c372a5c142..42cd642854 100644
--- a/gl/fseeko.c
+++ b/gl/fseeko.c
@@ -1,5 +1,5 @@
/* An fseeko() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
@@ -51,7 +51,7 @@ fseeko (FILE *fp, off_t offset, int whence)
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
# if defined __SL64 && defined __SCLE /* Cygwin */
if ((fp->_flags & __SL64) == 0)
{
@@ -109,7 +109,7 @@ fseeko (FILE *fp, off_t offset, int whence)
off_t pos = lseek (fileno (fp), offset, whence);
if (pos == -1)
{
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
fp_->_flags &= ~__SOFF;
#endif
return -1;
@@ -118,7 +118,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 */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
# if defined __CYGWIN__
/* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
diff --git a/gl/fseterr.c b/gl/fseterr.c
index 78791af3dc..0fca65f503 100644
--- a/gl/fseterr.c
+++ b/gl/fseterr.c
@@ -1,5 +1,5 @@
/* Set the error indicator of a stream.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
@@ -31,7 +31,7 @@ fseterr (FILE *fp)
fast macros. */
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags |= _IO_ERR_SEEN;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
fp_->_flags |= __SERR;
#elif defined __EMX__ /* emx+gcc */
fp->_flags |= _IOERR;
diff --git a/gl/fseterr.h b/gl/fseterr.h
index b3930c5a88..630fa8647f 100644
--- a/gl/fseterr.h
+++ b/gl/fseterr.h
@@ -1,5 +1,5 @@
/* Set the error indicator of a stream.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
@@ -19,19 +19,27 @@
#include <stdio.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
/* Set the error indicator of the stream FP.
The "error indicator" is set when an I/O operation on the stream fails, and
is cleared (together with the "end-of-file" indicator) by clearerr (FP). */
-extern void fseterr (FILE *fp);
+#if HAVE___FSETERR /* musl libc */
+
+# include <stdio_ext.h>
+# define fseterr(fp) __fseterr (fp)
-#ifdef __cplusplus
+#else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern void fseterr (FILE *fp);
+
+# ifdef __cplusplus
}
+# endif
+
#endif
#endif /* _FSETERR_H */
diff --git a/gl/fstat.c b/gl/fstat.c
index ac2b1effe3..dc802f502b 100644
--- a/gl/fstat.c
+++ b/gl/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -24,12 +24,14 @@
#include <sys/types.h>
#include <sys/stat.h>
#if _GL_WINDOWS_64_BIT_ST_SIZE
+# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
# define stat _stati64
+# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
# define fstat _fstati64
#endif
#undef __need_system_sys_stat_h
-static inline int
+static int
orig_fstat (int fd, struct stat *buf)
{
return fstat (fd, buf);
@@ -49,7 +51,7 @@ orig_fstat (int fd, struct stat *buf)
#endif
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
fstat_nothrow (int fd, struct stat *buf)
{
int result;
diff --git a/gl/ftell.c b/gl/ftell.c
index 817e9ff068..4ad13c9f48 100644
--- a/gl/ftell.c
+++ b/gl/ftell.c
@@ -1,5 +1,5 @@
/* An ftell() function that works around platform bugs.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/ftello.c b/gl/ftello.c
index 1f581c5a4c..3a2a0f2012 100644
--- a/gl/ftello.c
+++ b/gl/ftello.c
@@ -1,5 +1,5 @@
/* An ftello() function that works around platform bugs.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/gai_strerror.c b/gl/gai_strerror.c
index 5bb1c0455b..1e371d2764 100644
--- a/gl/gai_strerror.c
+++ b/gl/gai_strerror.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2012 Free Software
+/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c
index 069f2a95c5..58d2811567 100644
--- a/gl/getaddrinfo.c
+++ b/gl/getaddrinfo.c
@@ -1,5 +1,5 @@
/* Get address information (partial implementation).
- Copyright (C) 1997, 2001-2002, 2004-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001-2002, 2004-2013 Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
This program is free software; you can redistribute it and/or modify
@@ -15,12 +15,12 @@
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>
-
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the sa == NULL test below. */
#define _GL_ARG_NONNULL(params)
+#include <config.h>
+
#include <netdb.h>
#if HAVE_NETINET_IN_H
@@ -109,7 +109,7 @@ use_win32_p (void)
}
#endif
-static inline bool
+static bool
validate_family (int family)
{
/* FIXME: Support more families. */
diff --git a/gl/getdelim.c b/gl/getdelim.c
index b7af0a2e7f..fdbcde2a21 100644
--- a/gl/getdelim.c
+++ b/gl/getdelim.c
@@ -1,5 +1,5 @@
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2012 Free Software
+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or
@@ -17,12 +17,12 @@
/* Ported from glibc by Simon Josefsson. */
-#include <config.h>
-
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */
#define _GL_ARG_NONNULL(params)
+#include <config.h>
+
#include <stdio.h>
#include <limits.h>
diff --git a/gl/getline.c b/gl/getline.c
index f422747859..1aa07b9c77 100644
--- a/gl/getline.c
+++ b/gl/getline.c
@@ -1,5 +1,5 @@
/* getline.c --- Implementation of replacement getline function.
- Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2013 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
diff --git a/gl/getopt.c b/gl/getopt.c
index 4342a34104..ef0f4ceec7 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -2,7 +2,7 @@
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
- Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2012 Free Software
+ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index 06b6dfc50c..d9c7d8144a 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -49,7 +49,9 @@
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# if !@HAVE_GETOPT_H@
+# define __need_system_stdlib_h
# include <stdlib.h>
+# undef __need_system_stdlib_h
# include <stdio.h>
# include <unistd.h>
# endif
diff --git a/gl/getopt1.c b/gl/getopt1.c
index fb2a8f5a7b..55a6b4eae4 100644
--- a/gl/getopt1.c
+++ b/gl/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software
+ Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/getopt_int.h b/gl/getopt_int.h
index 2da020c995..a6e4b9ea71 100644
--- a/gl/getopt_int.h
+++ b/gl/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/getpass.c b/gl/getpass.c
index 41f3669ce3..3c9c4d8ae9 100644
--- a/gl/getpass.c
+++ b/gl/getpass.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/getpass.h b/gl/getpass.h
index 4eabf9dcc6..9b59abb155 100644
--- a/gl/getpass.h
+++ b/gl/getpass.h
@@ -1,5 +1,5 @@
/* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin.
- Copyright (C) 2004, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2013 Free Software Foundation, Inc.
Contributed by Simon Josefsson <jas@extundo.com>, 2004.
This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@
/* Get getpass declaration, if available. */
# include <unistd.h>
-# if defined HAVE_DECL_GETPASS && !HAVE_DECL_GETPASS
+# if !HAVE_DECL_GETPASS
/* Read a password of arbitrary length from /dev/tty or stdin. */
char *getpass (const char *prompt);
diff --git a/gl/getpeername.c b/gl/getpeername.c
index 01493aac94..be4dcfd31f 100644
--- a/gl/getpeername.c
+++ b/gl/getpeername.c
@@ -1,6 +1,6 @@
/* getpeername.c --- wrappers for Windows getpeername function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/getsubopt.c b/gl/getsubopt.c
index 105ceed5cc..539fdd0247 100644
--- a/gl/getsubopt.c
+++ b/gl/getsubopt.c
@@ -1,5 +1,5 @@
/* Parse comma separated list into words.
- Copyright (C) 1996-1997, 1999, 2004, 2007, 2009-2012 Free Software
+ Copyright (C) 1996-1997, 1999, 2004, 2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/gl/gettext.h b/gl/gettext.h
index 75875cdb0f..d0215715a9 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2012 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -183,9 +183,12 @@ npgettext_aux (const char *domain,
#include <string.h>
-#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
- (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
- /* || __STDC_VERSION__ >= 199901L */ )
+#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
+ /* || __STDC_VERSION__ >= 199901L */ )
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
+#else
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
+#endif
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
#include <stdlib.h>
diff --git a/gl/gettime.c b/gl/gettime.c
index 8075bfaf99..0a642dd201 100644
--- a/gl/gettime.c
+++ b/gl/gettime.c
@@ -1,6 +1,6 @@
/* gettime -- get the system clock
- Copyright (C) 2002, 2004-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004-2007, 2009-2013 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
diff --git a/gl/gettimeofday.c b/gl/gettimeofday.c
index 5d35060950..ad65c6da8b 100644
--- a/gl/gettimeofday.c
+++ b/gl/gettimeofday.c
@@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2013 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
diff --git a/gl/glthread/threadlib.c b/gl/glthread/threadlib.c
index 946268e911..b447657302 100644
--- a/gl/glthread/threadlib.c
+++ b/gl/glthread/threadlib.c
@@ -1,5 +1,5 @@
/* Multithreading primitives.
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 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
diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c
index b437e9752c..fdfd21dcbc 100644
--- a/gl/inet_ntop.c
+++ b/gl/inet_ntop.c
@@ -1,6 +1,6 @@
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
- Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2013 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
diff --git a/gl/inet_pton.c b/gl/inet_pton.c
index 40963650dc..78ebf1a1bb 100644
--- a/gl/inet_pton.c
+++ b/gl/inet_pton.c
@@ -1,6 +1,6 @@
/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
- Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2013 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
diff --git a/gl/intprops.h b/gl/intprops.h
index 2485c78d4b..b473052d11 100644
--- a/gl/intprops.h
+++ b/gl/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2005, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2005, 2009-2013 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
diff --git a/gl/isnan.c b/gl/isnan.c
index a5a7d92c03..d95e4bac77 100644
--- a/gl/isnan.c
+++ b/gl/isnan.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/isnand-nolibm.h b/gl/isnand-nolibm.h
index 56fb27094c..8a84ff8140 100644
--- a/gl/isnand-nolibm.h
+++ b/gl/isnand-nolibm.h
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/isnand.c b/gl/isnand.c
index ef815f3c95..cbad17b583 100644
--- a/gl/isnand.c
+++ b/gl/isnand.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/isnanf-nolibm.h b/gl/isnanf-nolibm.h
index 9d550e0977..dc43863a69 100644
--- a/gl/isnanf-nolibm.h
+++ b/gl/isnanf-nolibm.h
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/isnanf.c b/gl/isnanf.c
index 0816704bc3..946cb69ce0 100644
--- a/gl/isnanf.c
+++ b/gl/isnanf.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/isnanl-nolibm.h b/gl/isnanl-nolibm.h
index 58d963dbc3..18eb803714 100644
--- a/gl/isnanl-nolibm.h
+++ b/gl/isnanl-nolibm.h
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/isnanl.c b/gl/isnanl.c
index 597ac2a8fe..9d9d84b974 100644
--- a/gl/isnanl.c
+++ b/gl/isnanl.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/itold.c b/gl/itold.c
index 95ff7e1785..9aabc7e464 100644
--- a/gl/itold.c
+++ b/gl/itold.c
@@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/listen.c b/gl/listen.c
index a1b2ab7f6d..0ca834628e 100644
--- a/gl/listen.c
+++ b/gl/listen.c
@@ -1,6 +1,6 @@
/* listen.c --- wrappers for Windows listen function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/lseek.c b/gl/lseek.c
index 794c230447..fa7440d151 100644
--- a/gl/lseek.c
+++ b/gl/lseek.c
@@ -1,5 +1,5 @@
/* An lseek() function that detects pipes.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index d978cb898c..d4ad759fd3 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,5 +1,5 @@
# 00gnulib.m4 serial 2
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 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.
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index 656924be88..270abd0cd9 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,5 +1,5 @@
# alloca.m4 serial 14
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/alphasort.m4 b/gl/m4/alphasort.m4
index 6ca985ea9c..bb5e9d0976 100644
--- a/gl/m4/alphasort.m4
+++ b/gl/m4/alphasort.m4
@@ -1,5 +1,5 @@
# alphasort.m4 serial 2
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 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.
diff --git a/gl/m4/argp.m4 b/gl/m4/argp.m4
index 87c7da68a9..4445d8e6c3 100644
--- a/gl/m4/argp.m4
+++ b/gl/m4/argp.m4
@@ -1,5 +1,5 @@
-# argp.m4 serial 13
-dnl Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# argp.m4 serial 14
+dnl Copyright (C) 2003-2013 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.
@@ -10,18 +10,14 @@ AC_DEFUN([gl_ARGP],
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_DECL([program_invocation_name],
- [AC_DEFINE([HAVE_DECL_PROGRAM_INVOCATION_NAME], [1],
- [Define if program_invocation_name is declared])],
- [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_NAME], [1],
- [Define to 1 to add extern declaration of program_invocation_name to argp.h])],
- [[#include <errno.h>]])
- AC_CHECK_DECL([program_invocation_short_name],
- [AC_DEFINE([HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME], [1],
- [Define if program_invocation_short_name is declared])],
- [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_SHORT_NAME], [1],
- [Define to 1 to add extern declaration of program_invocation_short_name to argp.h])],
- [[#include <errno.h>]])
+ AC_CHECK_DECLS([program_invocation_name], [],
+ [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_NAME], [1],
+ [Define to 1 to add extern declaration of program_invocation_name to argp.h])],
+ [[#include <errno.h>]])
+ AC_CHECK_DECLS([program_invocation_short_name], [],
+ [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_SHORT_NAME], [1],
+ [Define to 1 to add extern declaration of program_invocation_short_name to argp.h])],
+ [[#include <errno.h>]])
# Check if program_invocation_name and program_invocation_short_name
# are defined elsewhere. It is improbable that only one of them will
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index 36915d12ea..ea69af5720 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,5 +1,5 @@
# arpa_inet_h.m4 serial 13
-dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2013 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.
diff --git a/gl/m4/base64.m4 b/gl/m4/base64.m4
index fa0c1928e8..fc19893eec 100644
--- a/gl/m4/base64.m4
+++ b/gl/m4/base64.m4
@@ -1,5 +1,5 @@
-# base64.m4 serial 3
-dnl Copyright (C) 2004, 2006, 2009-2012 Free Software Foundation, Inc.
+# base64.m4 serial 4
+dnl Copyright (C) 2004, 2006, 2009-2013 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.
@@ -11,6 +11,5 @@ AC_DEFUN([gl_FUNC_BASE64],
# Prerequisites of lib/base64.c.
AC_DEFUN([gl_PREREQ_BASE64], [
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_RESTRICT])
])
diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4
index f3b7ec97d0..7566903dc4 100644
--- a/gl/m4/byteswap.m4
+++ b/gl/m4/byteswap.m4
@@ -1,5 +1,5 @@
# byteswap.m4 serial 4
-dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2013 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.
diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4
index 0bec0ef860..6597fb63a0 100644
--- a/gl/m4/clock_time.m4
+++ b/gl/m4/clock_time.m4
@@ -1,5 +1,5 @@
# clock_time.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2013 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.
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4
index 379e70d83e..bccd9819ca 100644
--- a/gl/m4/close.m4
+++ b/gl/m4/close.m4
@@ -1,5 +1,5 @@
# close.m4 serial 8
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/closedir.m4 b/gl/m4/closedir.m4
index 8a2fba4b83..bb8708b69b 100644
--- a/gl/m4/closedir.m4
+++ b/gl/m4/closedir.m4
@@ -1,5 +1,5 @@
# closedir.m4 serial 2
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2013 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.
diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4
index cf53d24167..c2761be2ad 100644
--- a/gl/m4/codeset.m4
+++ b/gl/m4/codeset.m4
@@ -1,5 +1,5 @@
# codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2013 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.
diff --git a/gl/m4/dirent_h.m4 b/gl/m4/dirent_h.m4
index f6c0fa7ba3..54c1663431 100644
--- a/gl/m4/dirent_h.m4
+++ b/gl/m4/dirent_h.m4
@@ -1,5 +1,5 @@
# dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/dirname.m4 b/gl/m4/dirname.m4
index 65639ec89e..5897a2a8b3 100644
--- a/gl/m4/dirname.m4
+++ b/gl/m4/dirname.m4
@@ -1,5 +1,5 @@
#serial 10 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2013 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.
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4
index 1e03751375..bd6f867143 100644
--- a/gl/m4/double-slash-root.m4
+++ b/gl/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2013 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.
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index fc86e8085b..269cfdc112 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -1,5 +1,5 @@
-#serial 18
-dnl Copyright (C) 2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+#serial 19
+dnl Copyright (C) 2002, 2005, 2007, 2009-2013 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.
@@ -39,6 +39,9 @@ AC_DEFUN([gl_FUNC_DUP2],
/* Many gnulib modules require POSIX conformance of EBADF. */
if (dup2 (2, 1000000) == -1 && errno != EBADF)
result |= 16;
+ /* Flush out a cygwin core dump. */
+ if (dup2 (2, -1) != -1 || errno != EBADF)
+ result |= 32;
return result;
])
],
diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4
index 75f17e2f10..c640ec1299 100644
--- a/gl/m4/eealloc.m4
+++ b/gl/m4/eealloc.m4
@@ -1,5 +1,5 @@
-# eealloc.m4 serial 2
-dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
+# eealloc.m4 serial 3
+dnl Copyright (C) 2003, 2009-2013 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.
@@ -8,7 +8,6 @@ AC_DEFUN([gl_EEALLOC],
[
AC_REQUIRE([gl_EEMALLOC])
AC_REQUIRE([gl_EEREALLOC])
- AC_REQUIRE([AC_C_INLINE])
])
AC_DEFUN([gl_EEMALLOC],
diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4
index 8eb57c9d99..593a33ed42 100644
--- a/gl/m4/environ.m4
+++ b/gl/m4/environ.m4
@@ -1,5 +1,5 @@
# environ.m4 serial 6
-dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2013 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.
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 1e76ba270a..c813ea5835 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,5 +1,5 @@
-# errno_h.m4 serial 11
-dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc.
+# errno_h.m4 serial 12
+dnl Copyright (C) 2004, 2006, 2008-2013 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.
@@ -58,6 +58,9 @@ booboo
#if !defined ENOTRECOVERABLE
booboo
#endif
+#if !defined EILSEQ
+booboo
+#endif
],
[gl_cv_header_errno_h_complete=no],
[gl_cv_header_errno_h_complete=yes])
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
index 5d9c70a475..29e6fdc9c2 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -1,6 +1,6 @@
#serial 14
-# Copyright (C) 1996-1998, 2001-2004, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -23,6 +23,5 @@ AC_DEFUN([gl_ERROR],
AC_DEFUN([gl_PREREQ_ERROR],
[
AC_REQUIRE([AC_FUNC_STRERROR_R])
- AC_REQUIRE([AC_C_INLINE])
:
])
diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4
index 0ae4ccfac9..09df468c9b 100644
--- a/gl/m4/exponentd.m4
+++ b/gl/m4/exponentd.m4
@@ -1,5 +1,5 @@
# exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2013 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.
diff --git a/gl/m4/exponentf.m4 b/gl/m4/exponentf.m4
index 94d11679fa..55a04e63cc 100644
--- a/gl/m4/exponentf.m4
+++ b/gl/m4/exponentf.m4
@@ -1,5 +1,5 @@
# exponentf.m4 serial 2
-dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2013 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.
diff --git a/gl/m4/exponentl.m4 b/gl/m4/exponentl.m4
index a7cd13bc99..f877cf140f 100644
--- a/gl/m4/exponentl.m4
+++ b/gl/m4/exponentl.m4
@@ -1,5 +1,5 @@
# exponentl.m4 serial 3
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 0bfaef6f90..07ba376c0e 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,14 +1,14 @@
-# serial 11 -*- Autoconf -*-
+# serial 13 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2013 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.
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
# Autoconf. Perhaps we can remove this once we can assume Autoconf
-# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# 2.70 or later everywhere, but since Autoconf mutates rapidly
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
@@ -30,6 +30,7 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
+#
# Remember that #undef in AH_VERBATIM gets replaced with #define by
# AC_DEFINE. The goal here is to define all known feature-enabling
# macros, then, if reports of conflicts are made, disable macros that
@@ -38,8 +39,6 @@ AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
- AC_REQUIRE([AC_CANONICAL_HOST])
-
AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
if test "$MINIX" = yes; then
AC_DEFINE([_POSIX_SOURCE], [1],
@@ -50,24 +49,18 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
except with this defined.])
AC_DEFINE([_MINIX], [1],
[Define to 1 if on MINIX.])
+ AC_DEFINE([_NETBSD_SOURCE], [1],
+ [Define to 1 to make NetBSD features available. MINIX 3 needs this.])
fi
- dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
- dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
- dnl provided.
- case "$host_os" in
- hpux*)
- AC_DEFINE([_XOPEN_SOURCE], [500],
- [Define to 500 only on HP-UX.])
- ;;
- esac
-
- AH_VERBATIM([__EXTENSIONS__],
+dnl Use a different key than __EXTENSIONS__, as that name broke existing
+dnl configure.ac when using autoheader 2.62.
+ AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
[/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
-/* Enable general extensions on MacOS X. */
+/* Enable general extensions on OS X. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
@@ -83,6 +76,12 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
+/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
+ mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
+ whether compiling with -Ae or -D_HPUX_SOURCE=1. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
@@ -103,6 +102,22 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
+ AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
+ [ac_cv_should_define__xopen_source],
+ [ac_cv_should_define__xopen_source=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <wchar.h>
+ mbstate_t x;]])],
+ [],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;]])],
+ [ac_cv_should_define__xopen_source=yes])])])
+ test $ac_cv_should_define__xopen_source = yes &&
+ AC_DEFINE([_XOPEN_SOURCE], [500])
])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
new file mode 100644
index 0000000000..0152f29326
--- /dev/null
+++ b/gl/m4/extern-inline.m4
@@ -0,0 +1,65 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012-2013 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_EXTERN_INLINE],
+[
+ AH_VERBATIM([extern_inline],
+[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
+ _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
+ _GL_INLINE_HEADER_BEGIN contains useful stuff to put
+ in an include file, before uses of _GL_INLINE.
+ It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
+ when FOO is an inline function in the header; see
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
+ _GL_INLINE_HEADER_END contains useful stuff to put
+ in the same include file, after uses of _GL_INLINE.
+
+ Suppress extern inline with HP-UX cc, as it appears to be broken; see
+ <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+ Suppress the use of extern inline on Apple's platforms,
+ as Libc-825.25 (2012-09-19) is incompatible with it; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+ Perhaps Apple will fix this some day. */
+#if ((__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : 199901L <= __STDC_VERSION__ && !defined __HP_cc) \
+ && !defined __APPLE__)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
+# if __GNUC_GNU_INLINE__
+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+# define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+# define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+# define _GL_INLINE_HEADER_CONST_PRAGMA \
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+ _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 9862741f39..87cc4bd2dd 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
# fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2013 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.
@@ -50,7 +50,18 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
#if HAVE_SYMLINK
{
static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0)
+ if (symlink ("/dev/null", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ if (unlink (sym) != 0 || symlink (".", sym) != 0)
result |= 2;
else
{
diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4
index cac28aeb28..3cff1fd64d 100644
--- a/gl/m4/fcntl_h.m4
+++ b/gl/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
# serial 15
# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2013 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.
diff --git a/gl/m4/fdopen.m4 b/gl/m4/fdopen.m4
index 9ca9d2aca6..74d1649f53 100644
--- a/gl/m4/fdopen.m4
+++ b/gl/m4/fdopen.m4
@@ -1,5 +1,5 @@
-# fdopen.m4 serial 2
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# fdopen.m4 serial 3
+dnl Copyright (C) 2011-2013 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.
@@ -25,10 +25,8 @@ main (void)
FILE *fp;
errno = 0;
fp = fdopen (-1, "r");
- if (fp != NULL)
+ if (fp == NULL && errno == 0)
return 1;
- if (errno == 0)
- return 2;
return 0;
}]])],
[gl_cv_func_fdopen_works=yes],
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index 51c9c7b35c..397f2d1faa 100644
--- a/gl/m4/float_h.m4
+++ b/gl/m4/float_h.m4
@@ -1,5 +1,5 @@
# float_h.m4 serial 9
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/fpieee.m4 b/gl/m4/fpieee.m4
index 82fd778325..97941bb472 100644
--- a/gl/m4/fpieee.m4
+++ b/gl/m4/fpieee.m4
@@ -1,5 +1,5 @@
# fpieee.m4 serial 2
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/frexp.m4 b/gl/m4/frexp.m4
index 4162195e53..39097923e4 100644
--- a/gl/m4/frexp.m4
+++ b/gl/m4/frexp.m4
@@ -1,5 +1,5 @@
-# frexp.m4 serial 13
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# frexp.m4 serial 14
+dnl Copyright (C) 2007-2013 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.
@@ -107,7 +107,7 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static double
compute_minus_zero (void)
diff --git a/gl/m4/frexpl.m4 b/gl/m4/frexpl.m4
index 9df87ab82f..3b64c52233 100644
--- a/gl/m4/frexpl.m4
+++ b/gl/m4/frexpl.m4
@@ -1,5 +1,5 @@
-# frexpl.m4 serial 19
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# frexpl.m4 serial 20
+dnl Copyright (C) 2007-2013 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.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_FREXPL],
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
dnl Check whether it's declared.
- dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
FREXPL_LIBM=
@@ -73,7 +73,7 @@ AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM],
AC_REQUIRE([gl_MATH_H_DEFAULTS])
AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
dnl Check whether it's declared.
- dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
if test $HAVE_DECL_FREXPL = 1; then
gl_CHECK_FREXPL_NO_LIBM
@@ -113,8 +113,8 @@ AC_DEFUN([gl_CHECK_FREXPL_NO_LIBM],
])
dnl Test whether frexpl() works on finite numbers (this fails on
-dnl MacOS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
-dnl (this fails on MacOS X 10.5/i386), and also on infinite numbers (this
+dnl Mac OS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
+dnl (this fails on Mac OS X 10.5/i386), and also on infinite numbers (this
dnl fails e.g. on IRIX 6.5 and mingw).
AC_DEFUN([gl_FUNC_FREXPL_WORKS],
[
@@ -162,7 +162,7 @@ int main()
if (exp != 5)
result |= 1;
}
- /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
function returns an invalid (incorrectly normalized) value: it returns
y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
but the correct result is
@@ -201,7 +201,7 @@ int main()
int exp;
long double y = frexpl (x, &exp);
/* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
- exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
if (exp != LDBL_MIN_EXP - 1)
result |= 8;
}
diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4
index d9cd70a948..74f66564f6 100644
--- a/gl/m4/fseek.m4
+++ b/gl/m4/fseek.m4
@@ -1,5 +1,5 @@
# fseek.m4 serial 4
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index 1bb88c7613..e0f2dfbe1f 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,5 +1,5 @@
# fseeko.m4 serial 16
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/fseterr.m4 b/gl/m4/fseterr.m4
new file mode 100644
index 0000000000..b8e044b5b7
--- /dev/null
+++ b/gl/m4/fseterr.m4
@@ -0,0 +1,10 @@
+# fseterr.m4 serial 1
+dnl Copyright (C) 2012-2013 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_FSETERR],
+[
+ AC_CHECK_FUNCS_ONCE([__fseterr])
+])
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index 3ab3297b2c..b2cf2ad247 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,5 +1,5 @@
-# fstat.m4 serial 3
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# fstat.m4 serial 4
+dnl Copyright (C) 2011-2013 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.
@@ -33,7 +33,4 @@ AC_DEFUN([gl_FUNC_FSTAT],
])
# Prerequisites of lib/fstat.c.
-AC_DEFUN([gl_PREREQ_FSTAT],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FSTAT], [:])
diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4
index ed8d014649..5acd75297c 100644
--- a/gl/m4/ftell.m4
+++ b/gl/m4/ftell.m4
@@ -1,5 +1,5 @@
# ftell.m4 serial 3
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4
index ab7b548eba..678039ed14 100644
--- a/gl/m4/ftello.m4
+++ b/gl/m4/ftello.m4
@@ -1,5 +1,5 @@
# ftello.m4 serial 11
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/ftruncate.m4 b/gl/m4/ftruncate.m4
index 969eb0412d..4f2dafbab4 100644
--- a/gl/m4/ftruncate.m4
+++ b/gl/m4/ftruncate.m4
@@ -1,8 +1,8 @@
-# serial 19
+# serial 20
# See if we need to emulate a missing ftruncate function using chsize.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2013 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.
@@ -36,6 +36,5 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
# Prerequisites of lib/ftruncate.c.
AC_DEFUN([gl_PREREQ_FTRUNCATE],
[
- AC_REQUIRE([AC_C_INLINE])
AC_CHECK_FUNCS([chsize])
])
diff --git a/gl/m4/func.m4 b/gl/m4/func.m4
index 13c204d41b..5548d5e750 100644
--- a/gl/m4/func.m4
+++ b/gl/m4/func.m4
@@ -1,5 +1,5 @@
# func.m4 serial 2
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
index 9cd3e675ec..1d631f8cb8 100644
--- a/gl/m4/getaddrinfo.m4
+++ b/gl/m4/getaddrinfo.m4
@@ -1,5 +1,5 @@
-# getaddrinfo.m4 serial 29
-dnl Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# getaddrinfo.m4 serial 30
+dnl Copyright (C) 2004-2013 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.
@@ -134,7 +134,6 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
dnl Including sys/socket.h is wrong for Windows, but Windows does not
diff --git a/gl/m4/getcwd.m4 b/gl/m4/getcwd.m4
index 50b96c666c..6f91bd99e5 100644
--- a/gl/m4/getcwd.m4
+++ b/gl/m4/getcwd.m4
@@ -1,6 +1,6 @@
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2013 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.
@@ -123,7 +123,7 @@ AC_DEFUN([gl_FUNC_GETCWD],
dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD
dnl if appropriate.
case "$gl_cv_func_getcwd_path_max" in
- "no, it has the AIX bug") ;;
+ "no"|"no, it has the AIX bug") ;;
*)
AC_DEFINE([HAVE_MINIMALLY_WORKING_GETCWD], [1],
[Define to 1 if getcwd minimally works, that is, its result can be
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index a6f487217e..36f66a108b 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,6 +1,6 @@
# getdelim.m4 serial 10
-dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 72fbc9d44b..342bc99052 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,6 +1,6 @@
# getline.m4 serial 26
-dnl Copyright (C) 1998-2003, 2005-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index 2aea89595e..50f4509193 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,5 +1,5 @@
-# getopt.m4 serial 39
-dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
+# getopt.m4 serial 44
+dnl Copyright (C) 2002-2006, 2008-2013 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.
@@ -9,18 +9,17 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
[
m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
dnl Other modules can request the gnulib implementation of the getopt
dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
dnl argp.m4 does this.
m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
- gl_GETOPT_IFELSE([], [])
REPLACE_GETOPT=1
], [
REPLACE_GETOPT=0
- gl_GETOPT_IFELSE([
+ if test -n "$gl_replace_getopt"; then
REPLACE_GETOPT=1
- ],
- [])
+ fi
])
if test $REPLACE_GETOPT = 1; then
dnl Arrange for getopt.h to be created.
@@ -38,13 +37,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU],
AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
])
-# emacs' configure.in uses this.
-AC_DEFUN([gl_GETOPT_IFELSE],
-[
- AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
- AS_IF([test -n "$gl_replace_getopt"], [$1], [$2])
-])
-
# Determine whether to replace the entire getopt facility.
AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
[
@@ -74,11 +66,6 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
fi
- dnl mingw's getopt (in libmingwex.a) does weird things when the options
- dnl strings starts with '+' and it's not the first call. Some internal state
- dnl is left over from earlier calls, and neither setting optind = 0 nor
- dnl setting optreset = 1 get rid of this internal state.
- dnl POSIX is silent on optind vs. optreset, so we allow either behavior.
dnl POSIX 2008 does not specify leading '+' behavior, but see
dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
dnl the next version of POSIX. For now, we only guarantee leading '+'
@@ -87,30 +74,16 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
AC_CACHE_CHECK([whether getopt is POSIX compatible],
[gl_cv_func_getopt_posix],
[
- dnl BSD getopt_long uses an incompatible method to reset option
- dnl processing. Existence of the optreset variable, in and of
- dnl itself, is not a reason to replace getopt, but knowledge
- dnl of the variable is needed to determine how to reset and
- dnl whether a reset reparses the environment. Solaris
- dnl supports neither optreset nor optind=0, but keeps no state
- dnl that needs a reset beyond setting optind=1; detect Solaris
- dnl by getopt_clip.
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <unistd.h>]],
- [[int *p = &optreset; return optreset;]])],
- [gl_optind_min=1],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <getopt.h>]],
- [[return !getopt_clip;]])],
- [gl_optind_min=1],
- [gl_optind_min=0])])
-
- dnl This test fails on mingw and succeeds on many other platforms.
- gl_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ dnl Merging these three different test programs into a single one
+ dnl would require a reset mechanism. On BSD systems, it can be done
+ dnl through 'optreset'; on some others (glibc), it can be done by
+ dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1,
+ dnl Solaris 9, musl libc), there is no such mechanism.
+ if test $cross_compiling = no; then
+ dnl Sanity check. Succeeds everywhere (except on MSVC,
+ dnl which lacks <unistd.h> and getopt() entirely).
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -118,89 +91,107 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
int
main ()
{
- {
- static char program[] = "program";
- static char a[] = "-a";
- static char foo[] = "foo";
- static char bar[] = "bar";
- char *argv[] = { program, a, foo, bar, NULL };
- int c;
+ static char program[] = "program";
+ static char a[] = "-a";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, a, foo, bar, NULL };
+ int c;
- optind = OPTIND_MIN;
- opterr = 0;
-
- c = getopt (4, argv, "ab");
- if (!(c == 'a'))
- return 1;
- c = getopt (4, argv, "ab");
- if (!(c == -1))
- return 2;
- if (!(optind == 2))
- return 3;
- }
- /* Some internal state exists at this point. */
- {
- static char program[] = "program";
- static char donald[] = "donald";
- static char p[] = "-p";
- static char billy[] = "billy";
- static char duck[] = "duck";
- static char a[] = "-a";
- static char bar[] = "bar";
- char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
- int c;
+ c = getopt (4, argv, "ab");
+ if (!(c == 'a'))
+ return 1;
+ c = getopt (4, argv, "ab");
+ if (!(c == -1))
+ return 2;
+ if (!(optind == 2))
+ return 3;
+ return 0;
+}
+]])],
+ [gl_cv_func_getopt_posix=maybe],
+ [gl_cv_func_getopt_posix=no])
+ if test $gl_cv_func_getopt_posix = maybe; then
+ dnl Sanity check with '+'. Succeeds everywhere (except on MSVC,
+ dnl which lacks <unistd.h> and getopt() entirely).
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
- optind = OPTIND_MIN;
- opterr = 0;
+int
+main ()
+{
+ static char program[] = "program";
+ static char donald[] = "donald";
+ static char p[] = "-p";
+ static char billy[] = "billy";
+ static char duck[] = "duck";
+ static char a[] = "-a";
+ static char bar[] = "bar";
+ char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
+ int c;
- c = getopt (7, argv, "+abp:q:");
- if (!(c == -1))
- return 4;
- if (!(strcmp (argv[0], "program") == 0))
- return 5;
- if (!(strcmp (argv[1], "donald") == 0))
- return 6;
- if (!(strcmp (argv[2], "-p") == 0))
- return 7;
- if (!(strcmp (argv[3], "billy") == 0))
- return 8;
- if (!(strcmp (argv[4], "duck") == 0))
- return 9;
- if (!(strcmp (argv[5], "-a") == 0))
- return 10;
- if (!(strcmp (argv[6], "bar") == 0))
- return 11;
- if (!(optind == 1))
- return 12;
- }
- /* Detect MacOS 10.5, AIX 7.1 bug. */
- {
- static char program[] = "program";
- static char ab[] = "-ab";
- char *argv[3] = { program, ab, NULL };
- optind = OPTIND_MIN;
- opterr = 0;
- if (getopt (2, argv, "ab:") != 'a')
- return 13;
- if (getopt (2, argv, "ab:") != '?')
- return 14;
- if (optopt != 'b')
- return 15;
- if (optind != 2)
- return 16;
- }
+ c = getopt (7, argv, "+abp:q:");
+ if (!(c == -1))
+ return 4;
+ if (!(strcmp (argv[0], "program") == 0))
+ return 5;
+ if (!(strcmp (argv[1], "donald") == 0))
+ return 6;
+ if (!(strcmp (argv[2], "-p") == 0))
+ return 7;
+ if (!(strcmp (argv[3], "billy") == 0))
+ return 8;
+ if (!(strcmp (argv[4], "duck") == 0))
+ return 9;
+ if (!(strcmp (argv[5], "-a") == 0))
+ return 10;
+ if (!(strcmp (argv[6], "bar") == 0))
+ return 11;
+ if (!(optind == 1))
+ return 12;
+ return 0;
+}
+]])],
+ [gl_cv_func_getopt_posix=maybe],
+ [gl_cv_func_getopt_posix=no])
+ fi
+ if test $gl_cv_func_getopt_posix = maybe; then
+ dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug.
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+int
+main ()
+{
+ static char program[] = "program";
+ static char ab[] = "-ab";
+ char *argv[3] = { program, ab, NULL };
+ if (getopt (2, argv, "ab:") != 'a')
+ return 13;
+ if (getopt (2, argv, "ab:") != '?')
+ return 14;
+ if (optopt != 'b')
+ return 15;
+ if (optind != 2)
+ return 16;
return 0;
}
]])],
- [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no],
- [case "$host_os" in
- mingw*) gl_cv_func_getopt_posix="guessing no";;
- darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
- *) gl_cv_func_getopt_posix="guessing yes";;
- esac
- ])
- CPPFLAGS=$gl_save_CPPFLAGS
+ [gl_cv_func_getopt_posix=yes],
+ [gl_cv_func_getopt_posix=no])
+ fi
+ else
+ case "$host_os" in
+ darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
+ esac
+ fi
])
case "$gl_cv_func_getopt_posix" in
*no) gl_replace_getopt=yes ;;
@@ -236,7 +227,7 @@ dnl is ambiguous with environment values that contain newlines.
nocrash_init();
/* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
- and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+ and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
OSF/1 5.1, Solaris 10. */
{
static char conftest[] = "conftest";
@@ -247,7 +238,7 @@ dnl is ambiguous with environment values that contain newlines.
result |= 1;
}
/* This code succeeds on glibc 2.8, mingw,
- and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+ and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
{
static char program[] = "program";
@@ -276,7 +267,7 @@ dnl is ambiguous with environment values that contain newlines.
if (getopt (3, argv, "-p") != 1)
result |= 16;
else if (getopt (3, argv, "-p") != 'p')
- result |= 32;
+ result |= 16;
}
/* This code fails on glibc 2.11. */
{
@@ -286,9 +277,9 @@ dnl is ambiguous with environment values that contain newlines.
char *argv[] = { program, b, a, NULL };
optind = opterr = 0;
if (getopt (3, argv, "+:a:b") != 'b')
- result |= 64;
+ result |= 32;
else if (getopt (3, argv, "+:a:b") != ':')
- result |= 64;
+ result |= 32;
}
/* This code dumps core on glibc 2.14. */
{
@@ -298,18 +289,14 @@ dnl is ambiguous with environment values that contain newlines.
char *argv[] = { program, w, dummy, NULL };
optind = opterr = 1;
if (getopt (3, argv, "W;") != 'W')
- result |= 128;
+ result |= 64;
}
return result;
]])],
[gl_cv_func_getopt_gnu=yes],
[gl_cv_func_getopt_gnu=no],
- [dnl Cross compiling. Guess based on host and declarations.
- case $host_os:$ac_cv_have_decl_optreset in
- *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
- *:yes) gl_cv_func_getopt_gnu=no;;
- *) gl_cv_func_getopt_gnu=yes;;
- esac
+ [dnl Cross compiling. Assume the worst, even on glibc platforms.
+ gl_cv_func_getopt_gnu="guessing no"
])
case $gl_had_POSIXLY_CORRECT in
exported) ;;
@@ -317,13 +304,54 @@ dnl is ambiguous with environment values that contain newlines.
*) AS_UNSET([POSIXLY_CORRECT]) ;;
esac
])
- if test "$gl_cv_func_getopt_gnu" = "no"; then
+ if test "$gl_cv_func_getopt_gnu" != yes; then
gl_replace_getopt=yes
+ else
+ AC_CACHE_CHECK([for working GNU getopt_long function],
+ [gl_cv_func_getopt_long_gnu],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <getopt.h>
+ #include <stddef.h>
+ #include <string.h>
+ ]],
+ [[static const struct option long_options[] =
+ {
+ { "xtremely-",no_argument, NULL, 1003 },
+ { "xtra", no_argument, NULL, 1001 },
+ { "xtreme", no_argument, NULL, 1002 },
+ { "xtremely", no_argument, NULL, 1003 },
+ { NULL, 0, NULL, 0 }
+ };
+ /* This code fails on OpenBSD 5.0. */
+ {
+ static char program[] = "program";
+ static char xtremel[] = "--xtremel";
+ char *argv[] = { program, xtremel, NULL };
+ int option_index;
+ optind = 1; opterr = 0;
+ if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
+ return 1;
+ }
+ return 0;
+ ]])],
+ [gl_cv_func_getopt_long_gnu=yes],
+ [gl_cv_func_getopt_long_gnu=no],
+ [dnl Cross compiling. Guess no on OpenBSD, yes otherwise.
+ case "$host_os" in
+ openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
+ *) gl_cv_func_getopt_long_gnu="guessing yes";;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_getopt_long_gnu" in
+ *yes) ;;
+ *) gl_replace_getopt=yes ;;
+ esac
fi
fi
])
-# emacs' configure.in uses this.
AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
[
GETOPT_H=getopt.h
@@ -334,7 +362,6 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
])
# Prerequisites of lib/getopt*.
-# emacs' configure.in uses this.
AC_DEFUN([gl_PREREQ_GETOPT],
[
AC_CHECK_DECLS_ONCE([getenv])
diff --git a/gl/m4/getpagesize.m4 b/gl/m4/getpagesize.m4
index 156133aed6..06e893d7cf 100644
--- a/gl/m4/getpagesize.m4
+++ b/gl/m4/getpagesize.m4
@@ -1,5 +1,5 @@
# getpagesize.m4 serial 9
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/getpass.m4 b/gl/m4/getpass.m4
index 2a7e1600ef..e35dea4d12 100644
--- a/gl/m4/getpass.m4
+++ b/gl/m4/getpass.m4
@@ -1,5 +1,5 @@
# getpass.m4 serial 14
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/getsubopt.m4 b/gl/m4/getsubopt.m4
index 55389414d1..4bcfd7ff7c 100644
--- a/gl/m4/getsubopt.m4
+++ b/gl/m4/getsubopt.m4
@@ -1,5 +1,5 @@
# getsubopt.m4 serial 5
-dnl Copyright (C) 2004, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2007, 2009-2013 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.
diff --git a/gl/m4/gettext.m4 b/gl/m4/gettext.m4
index 5415f88ef0..8d1f0665c8 100644
--- a/gl/m4/gettext.m4
+++ b/gl/m4/gettext.m4
@@ -1,5 +1,5 @@
-# gettext.m4 serial 64 (gettext-0.18.2)
-dnl Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# gettext.m4 serial 66 (gettext-0.18.2)
+dnl Copyright (C) 1995-2013 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.
@@ -97,7 +97,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
])
- dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
gt_INTL_MACOSX
dnl Set USE_NLS.
diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4
index 7d03d1253b..dc100de5e4 100644
--- a/gl/m4/gettime.m4
+++ b/gl/m4/gettime.m4
@@ -1,5 +1,5 @@
# gettime.m4 serial 8
-dnl Copyright (C) 2002, 2004-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2006, 2009-2013 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.
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index eda97027a9..3c05e59f06 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
# serial 20
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2013 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.
diff --git a/gl/m4/glibc2.m4 b/gl/m4/glibc2.m4
index f4c4ad16ae..0e50682660 100644
--- a/gl/m4/glibc2.m4
+++ b/gl/m4/glibc2.m4
@@ -1,5 +1,5 @@
# glibc2.m4 serial 3
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/glibc21.m4 b/gl/m4/glibc21.m4
index c938fb1a0c..613fb2a41e 100644
--- a/gl/m4/glibc21.m4
+++ b/gl/m4/glibc21.m4
@@ -1,5 +1,5 @@
# glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index ee3d1b6261..7d68a69aa5 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -112,5 +112,5 @@ gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([gl])
gl_PO_DOMAIN([])
-gl_WITNESS_C_DOMAIN([])
+gl_WITNESS_C_MACRO([])
gl_VC_FILES([false])
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index d62b7677ab..0ae5a9ec66 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 32
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 33
+dnl Copyright (C) 2007-2013 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.
@@ -30,7 +30,7 @@ AC_DEFUN([gl_COMMON_BODY], [
[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
- __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE__ && __MACH__ test for Mac OS X.
__APPLE_CC__ tests for the Apple compiler and its version.
__STDC_VERSION__ tests for the C99 mode. */
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
@@ -294,6 +294,8 @@ Amsterdam
# for interoperability with automake-1.9.6 from autoconf-2.62.
# Remove this macro when we can assume autoconf >= 2.62 or
# autoconf >= 2.60 && automake >= 1.10.
+# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
m4_ifdef([AC_PROG_MKDIR_P], [
dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
m4_define([AC_PROG_MKDIR_P],
@@ -304,13 +306,15 @@ m4_ifdef([AC_PROG_MKDIR_P], [
[AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
MKDIR_P='$(mkdir_p)'
AC_SUBST([MKDIR_P])])])
+])
# AC_C_RESTRICT
# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
# 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_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
AC_DEFUN([AC_C_RESTRICT],
[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
[ac_cv_c_restrict=no
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 4d134505cb..e4787961a7 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -79,6 +79,7 @@ AC_DEFUN([gl_EARLY],
# Code from module error:
# Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ # Code from module extern-inline:
# Code from module fcntl-h:
# Code from module fcntl-h-tests:
# Code from module fd-hook:
@@ -365,480 +366,490 @@ AC_DEFUN([gl_INIT],
m4_pushdef([gl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='gl'
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([accept])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([accept])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([accept])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([accept])
changequote(,)dnl
LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
changequote([, ])dnl
AC_SUBST([LTALLOCA])
-gl_FUNC_ALLOCA
-gl_FUNC_ALPHASORT
-if test $HAVE_ALPHASORT = 0; then
- AC_LIBOBJ([alphasort])
- gl_PREREQ_ALPHASORT
-fi
-gl_DIRENT_MODULE_INDICATOR([alphasort])
-gl_ARGP
-m4_ifdef([AM_XGETTEXT_OPTION],
- [AM_][XGETTEXT_OPTION([--flag=argp_error:2:c-format])
- AM_][XGETTEXT_OPTION([--flag=argp_failure:4:c-format])])
-gl_HEADER_ARPA_INET
-AC_PROG_MKDIR_P
-gl_FUNC_BASE64
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([bind])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([bind])
-gl_BYTESWAP
-gl_CLOCK_TIME
-gl_FUNC_CLOSE
-if test $REPLACE_CLOSE = 1; then
- AC_LIBOBJ([close])
-fi
-gl_UNISTD_MODULE_INDICATOR([close])
-gl_FUNC_CLOSEDIR
-if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
- AC_LIBOBJ([closedir])
-fi
-gl_DIRENT_MODULE_INDICATOR([closedir])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([connect])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([connect])
-gl_DIRENT_H
-gl_DIRNAME_LGPL
-gl_DOUBLE_SLASH_ROOT
-gl_HEADER_ERRNO_H
-gl_ERROR
-if test $ac_cv_lib_error_at_line = no; then
- AC_LIBOBJ([error])
- gl_PREREQ_ERROR
-fi
-m4_ifdef([AM_XGETTEXT_OPTION],
- [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
- AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
-gl_FLOAT_H
-if test $REPLACE_FLOAT_LDBL = 1; then
- AC_LIBOBJ([float])
-fi
-if test $REPLACE_ITOLD = 1; then
- AC_LIBOBJ([itold])
-fi
-gl_FUNC_FREXP_NO_LIBM
-if test $gl_func_frexp_no_libm != yes; then
- AC_LIBOBJ([frexp])
-fi
-gl_MATH_MODULE_INDICATOR([frexp])
-gl_FUNC_FREXPL_NO_LIBM
-if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
- AC_LIBOBJ([frexpl])
-fi
-gl_MATH_MODULE_INDICATOR([frexpl])
-gl_FUNC_FSEEK
-if test $REPLACE_FSEEK = 1; then
- AC_LIBOBJ([fseek])
-fi
-gl_STDIO_MODULE_INDICATOR([fseek])
-gl_FUNC_FSEEKO
-if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
- AC_LIBOBJ([fseeko])
- gl_PREREQ_FSEEKO
-fi
-gl_STDIO_MODULE_INDICATOR([fseeko])
-gl_FUNC_FSTAT
-if test $REPLACE_FSTAT = 1; then
- AC_LIBOBJ([fstat])
- gl_PREREQ_FSTAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([fstat])
-gl_FUNC_FTELL
-if test $REPLACE_FTELL = 1; then
- AC_LIBOBJ([ftell])
-fi
-gl_STDIO_MODULE_INDICATOR([ftell])
-gl_FUNC_FTELLO
-if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
- AC_LIBOBJ([ftello])
- gl_PREREQ_FTELLO
-fi
-gl_STDIO_MODULE_INDICATOR([ftello])
-gl_FUNC
-gl_GETADDRINFO
-if test $HAVE_GETADDRINFO = 0; then
- AC_LIBOBJ([getaddrinfo])
-fi
-if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
- AC_LIBOBJ([gai_strerror])
-fi
-gl_NETDB_MODULE_INDICATOR([getaddrinfo])
-gl_FUNC_GETDELIM
-if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
- AC_LIBOBJ([getdelim])
- gl_PREREQ_GETDELIM
-fi
-gl_STDIO_MODULE_INDICATOR([getdelim])
-gl_FUNC_GETLINE
-if test $REPLACE_GETLINE = 1; then
- AC_LIBOBJ([getline])
- gl_PREREQ_GETLINE
-fi
-gl_STDIO_MODULE_INDICATOR([getline])
-gl_FUNC_GETOPT_GNU
-if test $REPLACE_GETOPT = 1; then
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_GL_UNISTD_H_GETOPT=1
-fi
-AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
-gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
-gl_FUNC_GETOPT_POSIX
-if test $REPLACE_GETOPT = 1; then
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_GL_UNISTD_H_GETOPT=1
-fi
-AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
-gl_FUNC_GETPASS
-if test $HAVE_GETPASS = 0; then
- AC_LIBOBJ([getpass])
- gl_PREREQ_GETPASS
-fi
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([getpeername])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([getpeername])
-gl_FUNC_GETSUBOPT
-if test $HAVE_GETSUBOPT = 0; then
- AC_LIBOBJ([getsubopt])
- gl_PREREQ_GETSUBOPT
-fi
-gl_STDLIB_MODULE_INDICATOR([getsubopt])
-dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
-AM_GNU_GETTEXT_VERSION([0.18.1])
-AC_SUBST([LIBINTL])
-AC_SUBST([LTLIBINTL])
-gl_GETTIME
-gl_FUNC_GETTIMEOFDAY
-if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
- AC_LIBOBJ([gettimeofday])
- gl_PREREQ_GETTIMEOFDAY
-fi
-gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
-# Autoconf 2.61a.99 and earlier don't support linking a file only
-# in VPATH builds. But since GNUmakefile is for maintainer use
-# only, it does not matter if we skip the link with older autoconf.
-# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
-# builds, so use a shell variable to bypass this.
-GNUmakefile=GNUmakefile
-m4_if(m4_version_compare([2.61a.100],
- m4_defn([m4_PACKAGE_VERSION])), [1], [],
- [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
- [GNUmakefile=$GNUmakefile])])
-gl_HOSTENT
-gl_FUNC_INET_NTOP
-if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
- AC_LIBOBJ([inet_ntop])
- gl_PREREQ_INET_NTOP
-fi
-gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
-gl_FUNC_INET_PTON
-if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
- AC_LIBOBJ([inet_pton])
- gl_PREREQ_INET_PTON
-fi
-gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
-gl_FUNC_ISNAND_NO_LIBM
-if test $gl_func_isnand_no_libm != yes; then
- AC_LIBOBJ([isnand])
- gl_PREREQ_ISNAND
-fi
-gl_FUNC_ISNANF_NO_LIBM
-if test $gl_func_isnanf_no_libm != yes; then
- AC_LIBOBJ([isnanf])
- gl_PREREQ_ISNANF
-fi
-gl_FUNC_ISNANL_NO_LIBM
-if test $gl_func_isnanl_no_libm != yes; then
- AC_LIBOBJ([isnanl])
- gl_PREREQ_ISNANL
-fi
-AC_REQUIRE([gl_LARGEFILE])
-gl_LD_OUTPUT_DEF
-gl_LD_VERSION_SCRIPT
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([listen])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([listen])
-gl_FUNC_LSEEK
-if test $REPLACE_LSEEK = 1; then
- AC_LIBOBJ([lseek])
-fi
-gl_UNISTD_MODULE_INDICATOR([lseek])
-AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
- [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
-gl_FUNC_MALLOC_GNU
-if test $REPLACE_MALLOC = 1; then
- AC_LIBOBJ([malloc])
-fi
-gl_MODULE_INDICATOR([malloc-gnu])
-gl_FUNC_MALLOC_POSIX
-if test $REPLACE_MALLOC = 1; then
- AC_LIBOBJ([malloc])
-fi
-gl_STDLIB_MODULE_INDICATOR([malloc-posix])
-gl_MATH_H
-gl_FUNC_MEMCHR
-if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
- AC_LIBOBJ([memchr])
- gl_PREREQ_MEMCHR
-fi
-gl_STRING_MODULE_INDICATOR([memchr])
-gl_FUNC_MEMMEM_SIMPLE
-if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
- AC_LIBOBJ([memmem])
-fi
-gl_STRING_MODULE_INDICATOR([memmem])
-gl_FUNC_MEMPCPY
-if test $HAVE_MEMPCPY = 0; then
- AC_LIBOBJ([mempcpy])
- gl_PREREQ_MEMPCPY
-fi
-gl_STRING_MODULE_INDICATOR([mempcpy])
-gl_MINMAX
-gl_MSVC_INVAL
-if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- AC_LIBOBJ([msvc-inval])
-fi
-gl_MSVC_NOTHROW
-if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- AC_LIBOBJ([msvc-nothrow])
-fi
-gl_MULTIARCH
-gl_HEADER_NETDB
-gl_HEADER_NETINET_IN
-AC_PROG_MKDIR_P
-gl_FUNC_OPENDIR
-if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
- AC_LIBOBJ([opendir])
-fi
-gl_DIRENT_MODULE_INDICATOR([opendir])
-AC_PATH_PROG([PMCCABE], [pmccabe], [false])
-gl_FUNC_PRINTF_FREXP
-gl_FUNC_PRINTF_FREXPL
-m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
-AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
-AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
-gl_FUNC_RAWMEMCHR
-if test $HAVE_RAWMEMCHR = 0; then
- AC_LIBOBJ([rawmemchr])
- gl_PREREQ_RAWMEMCHR
-fi
-gl_STRING_MODULE_INDICATOR([rawmemchr])
-gl_PREREQ_READ_FILE
-gl_FUNC_READDIR
-if test $HAVE_READDIR = 0; then
- AC_LIBOBJ([readdir])
-fi
-gl_DIRENT_MODULE_INDICATOR([readdir])
-gl_FUNC_REALLOC_POSIX
-if test $REPLACE_REALLOC = 1; then
- AC_LIBOBJ([realloc])
-fi
-gl_STDLIB_MODULE_INDICATOR([realloc-posix])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([recv])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([recv])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([recvfrom])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom])
-gl_FUNC_SCANDIR
-if test $HAVE_SCANDIR = 0; then
- AC_LIBOBJ([scandir])
- gl_PREREQ_SCANDIR
-fi
-gl_DIRENT_MODULE_INDICATOR([scandir])
-gl_FUNC_SELECT
-if test $REPLACE_SELECT = 1; then
- AC_LIBOBJ([select])
-fi
-gl_SYS_SELECT_MODULE_INDICATOR([select])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([send])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([send])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([sendto])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([sendto])
-gl_SERVENT
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([setsockopt])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([shutdown])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
-gl_SIGNAL_H
-gl_SIGNBIT
-if test $REPLACE_SIGNBIT = 1; then
- AC_LIBOBJ([signbitf])
- AC_LIBOBJ([signbitd])
- AC_LIBOBJ([signbitl])
-fi
-gl_MATH_MODULE_INDICATOR([signbit])
-gl_SIZE_MAX
-gl_FUNC_SLEEP
-if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
- AC_LIBOBJ([sleep])
-fi
-gl_UNISTD_MODULE_INDICATOR([sleep])
-gl_FUNC_SNPRINTF
-gl_STDIO_MODULE_INDICATOR([snprintf])
-gl_MODULE_INDICATOR([snprintf])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
- AC_LIBOBJ([socket])
-fi
-# When this module is used, sockets may actually occur as file descriptors,
-# hence it is worth warning if the modules 'close' and 'ioctl' are not used.
-m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
-m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
-AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
-if test "$ac_cv_header_winsock2_h" = yes; then
- UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
- SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([socket])
-gl_SOCKETLIB
-gl_SOCKETS
-gl_TYPE_SOCKLEN_T
-gt_TYPE_SSIZE_T
-gl_STDALIGN_H
-gl_STDARG_H
-AM_STDBOOL_H
-gl_STDDEF_H
-gl_STDINT_H
-gl_STDIO_H
-gl_STDLIB_H
-gl_STRCASE
-if test $HAVE_STRCASECMP = 0; then
- AC_LIBOBJ([strcasecmp])
- gl_PREREQ_STRCASECMP
-fi
-if test $HAVE_STRNCASECMP = 0; then
- AC_LIBOBJ([strncasecmp])
- gl_PREREQ_STRNCASECMP
-fi
-gl_FUNC_STRCHRNUL
-if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
- AC_LIBOBJ([strchrnul])
- gl_PREREQ_STRCHRNUL
-fi
-gl_STRING_MODULE_INDICATOR([strchrnul])
-gl_FUNC_STRDUP_POSIX
-if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
- AC_LIBOBJ([strdup])
- gl_PREREQ_STRDUP
-fi
-gl_STRING_MODULE_INDICATOR([strdup])
-gl_FUNC_STRERROR
-if test $REPLACE_STRERROR = 1; then
- AC_LIBOBJ([strerror])
-fi
-gl_MODULE_INDICATOR([strerror])
-gl_STRING_MODULE_INDICATOR([strerror])
-AC_REQUIRE([gl_HEADER_ERRNO_H])
-AC_REQUIRE([gl_FUNC_STRERROR_0])
-if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
- AC_LIBOBJ([strerror-override])
- gl_PREREQ_SYS_H_WINSOCK2
-fi
-gl_HEADER_STRING_H
-gl_HEADER_STRINGS_H
-gl_FUNC_STRNDUP
-if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
- AC_LIBOBJ([strndup])
-fi
-gl_STRING_MODULE_INDICATOR([strndup])
-gl_FUNC_STRNLEN
-if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
- AC_LIBOBJ([strnlen])
- gl_PREREQ_STRNLEN
-fi
-gl_STRING_MODULE_INDICATOR([strnlen])
-gl_FUNC_STRTOK_R
-if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
- AC_LIBOBJ([strtok_r])
- gl_PREREQ_STRTOK_R
-fi
-gl_STRING_MODULE_INDICATOR([strtok_r])
-gl_FUNC_STRVERSCMP
-if test $HAVE_STRVERSCMP = 0; then
- AC_LIBOBJ([strverscmp])
- gl_PREREQ_STRVERSCMP
-fi
-gl_STRING_MODULE_INDICATOR([strverscmp])
-gl_HEADER_SYS_SELECT
-AC_PROG_MKDIR_P
-gl_HEADER_SYS_SOCKET
-AC_PROG_MKDIR_P
-gl_HEADER_SYS_STAT_H
-AC_PROG_MKDIR_P
-gl_HEADER_SYS_TIME_H
-AC_PROG_MKDIR_P
-gl_SYS_TYPES_H
-AC_PROG_MKDIR_P
-gl_HEADER_SYS_UIO
-AC_PROG_MKDIR_P
-gl_SYSEXITS
-gl_THREADLIB
-gl_HEADER_TIME_H
-gl_TIME_R
-if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
- AC_LIBOBJ([time_r])
- gl_PREREQ_TIME_R
-fi
-gl_TIME_MODULE_INDICATOR([time_r])
-gl_TIMER_TIME
-gl_TIMESPEC
-AC_REQUIRE([AC_C_INLINE])
-gl_UNISTD_H
-gl_VALGRIND_TESTS
-gl_FUNC_VASNPRINTF
-gl_FUNC_VASPRINTF
-gl_STDIO_MODULE_INDICATOR([vasprintf])
-m4_ifdef([AM_XGETTEXT_OPTION],
- [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
- AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
-gl_VERSION_ETC
-gl_FUNC_VFPRINTF_POSIX
-gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
-gl_FUNC_VPRINTF_POSIX
-gl_STDIO_MODULE_INDICATOR([vprintf-posix])
-gl_FUNC_VSNPRINTF
-gl_STDIO_MODULE_INDICATOR([vsnprintf])
-gl_WCHAR_H
-gl_XSIZE
+ gl_FUNC_ALLOCA
+ gl_FUNC_ALPHASORT
+ if test $HAVE_ALPHASORT = 0; then
+ AC_LIBOBJ([alphasort])
+ gl_PREREQ_ALPHASORT
+ fi
+ gl_DIRENT_MODULE_INDICATOR([alphasort])
+ gl_ARGP
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=argp_error:2:c-format])
+ AM_][XGETTEXT_OPTION([--flag=argp_failure:4:c-format])])
+ gl_HEADER_ARPA_INET
+ AC_PROG_MKDIR_P
+ gl_FUNC_BASE64
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([bind])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([bind])
+ gl_BYTESWAP
+ gl_CLOCK_TIME
+ gl_FUNC_CLOSE
+ if test $REPLACE_CLOSE = 1; then
+ AC_LIBOBJ([close])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([close])
+ gl_FUNC_CLOSEDIR
+ if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
+ AC_LIBOBJ([closedir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([closedir])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([connect])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([connect])
+ gl_DIRENT_H
+ gl_DIRNAME_LGPL
+ gl_DOUBLE_SLASH_ROOT
+ gl_FUNC_DUP2
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+ AC_LIBOBJ([dup2])
+ gl_PREREQ_DUP2
+ fi
+ gl_UNISTD_MODULE_INDICATOR([dup2])
+ gl_HEADER_ERRNO_H
+ gl_ERROR
+ if test $ac_cv_lib_error_at_line = no; then
+ AC_LIBOBJ([error])
+ gl_PREREQ_ERROR
+ fi
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+ AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+ AC_REQUIRE([gl_EXTERN_INLINE])
+ gl_FLOAT_H
+ if test $REPLACE_FLOAT_LDBL = 1; then
+ AC_LIBOBJ([float])
+ fi
+ if test $REPLACE_ITOLD = 1; then
+ AC_LIBOBJ([itold])
+ fi
+ gl_FUNC_FREXP_NO_LIBM
+ if test $gl_func_frexp_no_libm != yes; then
+ AC_LIBOBJ([frexp])
+ fi
+ gl_MATH_MODULE_INDICATOR([frexp])
+ gl_FUNC_FREXPL_NO_LIBM
+ if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
+ AC_LIBOBJ([frexpl])
+ fi
+ gl_MATH_MODULE_INDICATOR([frexpl])
+ gl_FUNC_FSEEK
+ if test $REPLACE_FSEEK = 1; then
+ AC_LIBOBJ([fseek])
+ fi
+ gl_STDIO_MODULE_INDICATOR([fseek])
+ gl_FUNC_FSEEKO
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+ AC_LIBOBJ([fseeko])
+ gl_PREREQ_FSEEKO
+ fi
+ gl_STDIO_MODULE_INDICATOR([fseeko])
+ gl_FUNC_FSETERR
+ if test $ac_cv_func___fseterr = no; then
+ AC_LIBOBJ([fseterr])
+ fi
+ gl_FUNC_FSTAT
+ if test $REPLACE_FSTAT = 1; then
+ AC_LIBOBJ([fstat])
+ gl_PREREQ_FSTAT
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([fstat])
+ gl_FUNC_FTELL
+ if test $REPLACE_FTELL = 1; then
+ AC_LIBOBJ([ftell])
+ fi
+ gl_STDIO_MODULE_INDICATOR([ftell])
+ gl_FUNC_FTELLO
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+ AC_LIBOBJ([ftello])
+ gl_PREREQ_FTELLO
+ fi
+ gl_STDIO_MODULE_INDICATOR([ftello])
+ gl_FUNC
+ gl_GETADDRINFO
+ if test $HAVE_GETADDRINFO = 0; then
+ AC_LIBOBJ([getaddrinfo])
+ fi
+ if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
+ AC_LIBOBJ([gai_strerror])
+ fi
+ gl_NETDB_MODULE_INDICATOR([getaddrinfo])
+ gl_FUNC_GETDELIM
+ if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
+ AC_LIBOBJ([getdelim])
+ gl_PREREQ_GETDELIM
+ fi
+ gl_STDIO_MODULE_INDICATOR([getdelim])
+ gl_FUNC_GETLINE
+ if test $REPLACE_GETLINE = 1; then
+ AC_LIBOBJ([getline])
+ gl_PREREQ_GETLINE
+ fi
+ gl_STDIO_MODULE_INDICATOR([getline])
+ gl_FUNC_GETOPT_GNU
+ if test $REPLACE_GETOPT = 1; then
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_PREREQ_GETOPT
+ dnl Arrange for unistd.h to include getopt.h.
+ GNULIB_GL_UNISTD_H_GETOPT=1
+ fi
+ AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+ gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
+ gl_FUNC_GETOPT_POSIX
+ if test $REPLACE_GETOPT = 1; then
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_PREREQ_GETOPT
+ dnl Arrange for unistd.h to include getopt.h.
+ GNULIB_GL_UNISTD_H_GETOPT=1
+ fi
+ AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+ gl_FUNC_GETPASS
+ if test $HAVE_GETPASS = 0; then
+ AC_LIBOBJ([getpass])
+ gl_PREREQ_GETPASS
+ fi
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([getpeername])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([getpeername])
+ gl_FUNC_GETSUBOPT
+ if test $HAVE_GETSUBOPT = 0; then
+ AC_LIBOBJ([getsubopt])
+ gl_PREREQ_GETSUBOPT
+ fi
+ gl_STDLIB_MODULE_INDICATOR([getsubopt])
+ dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+ AM_GNU_GETTEXT_VERSION([0.18.1])
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ gl_GETTIME
+ gl_FUNC_GETTIMEOFDAY
+ if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ fi
+ gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ m4_if(m4_version_compare([2.61a.100],
+ m4_defn([m4_PACKAGE_VERSION])), [1], [],
+ [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+ [GNUmakefile=$GNUmakefile])])
+ gl_HOSTENT
+ gl_FUNC_INET_NTOP
+ if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
+ AC_LIBOBJ([inet_ntop])
+ gl_PREREQ_INET_NTOP
+ fi
+ gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
+ gl_FUNC_INET_PTON
+ if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
+ AC_LIBOBJ([inet_pton])
+ gl_PREREQ_INET_PTON
+ fi
+ gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
+ gl_FUNC_ISNAND_NO_LIBM
+ if test $gl_func_isnand_no_libm != yes; then
+ AC_LIBOBJ([isnand])
+ gl_PREREQ_ISNAND
+ fi
+ gl_FUNC_ISNANF_NO_LIBM
+ if test $gl_func_isnanf_no_libm != yes; then
+ AC_LIBOBJ([isnanf])
+ gl_PREREQ_ISNANF
+ fi
+ gl_FUNC_ISNANL_NO_LIBM
+ if test $gl_func_isnanl_no_libm != yes; then
+ AC_LIBOBJ([isnanl])
+ gl_PREREQ_ISNANL
+ fi
+ AC_REQUIRE([gl_LARGEFILE])
+ gl_LD_OUTPUT_DEF
+ gl_LD_VERSION_SCRIPT
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([listen])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([listen])
+ gl_FUNC_LSEEK
+ if test $REPLACE_LSEEK = 1; then
+ AC_LIBOBJ([lseek])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([lseek])
+ AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+ [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+ gl_FUNC_MALLOC_GNU
+ if test $REPLACE_MALLOC = 1; then
+ AC_LIBOBJ([malloc])
+ fi
+ gl_MODULE_INDICATOR([malloc-gnu])
+ gl_FUNC_MALLOC_POSIX
+ if test $REPLACE_MALLOC = 1; then
+ AC_LIBOBJ([malloc])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+ gl_MATH_H
+ gl_FUNC_MEMCHR
+ if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+ AC_LIBOBJ([memchr])
+ gl_PREREQ_MEMCHR
+ fi
+ gl_STRING_MODULE_INDICATOR([memchr])
+ gl_FUNC_MEMMEM_SIMPLE
+ if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+ AC_LIBOBJ([memmem])
+ fi
+ gl_STRING_MODULE_INDICATOR([memmem])
+ gl_FUNC_MEMPCPY
+ if test $HAVE_MEMPCPY = 0; then
+ AC_LIBOBJ([mempcpy])
+ gl_PREREQ_MEMPCPY
+ fi
+ gl_STRING_MODULE_INDICATOR([mempcpy])
+ gl_MINMAX
+ gl_MSVC_INVAL
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ AC_LIBOBJ([msvc-inval])
+ fi
+ gl_MSVC_NOTHROW
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ AC_LIBOBJ([msvc-nothrow])
+ fi
+ gl_MULTIARCH
+ gl_HEADER_NETDB
+ gl_HEADER_NETINET_IN
+ AC_PROG_MKDIR_P
+ gl_FUNC_OPENDIR
+ if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+ AC_LIBOBJ([opendir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([opendir])
+ AC_PATH_PROG([PMCCABE], [pmccabe], [false])
+ gl_FUNC_PRINTF_FREXP
+ gl_FUNC_PRINTF_FREXPL
+ m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
+ AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+ gl_FUNC_RAWMEMCHR
+ if test $HAVE_RAWMEMCHR = 0; then
+ AC_LIBOBJ([rawmemchr])
+ gl_PREREQ_RAWMEMCHR
+ fi
+ gl_STRING_MODULE_INDICATOR([rawmemchr])
+ gl_PREREQ_READ_FILE
+ gl_FUNC_READDIR
+ if test $HAVE_READDIR = 0; then
+ AC_LIBOBJ([readdir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([readdir])
+ gl_FUNC_REALLOC_POSIX
+ if test $REPLACE_REALLOC = 1; then
+ AC_LIBOBJ([realloc])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([recv])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([recv])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([recvfrom])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom])
+ gl_FUNC_SCANDIR
+ if test $HAVE_SCANDIR = 0; then
+ AC_LIBOBJ([scandir])
+ gl_PREREQ_SCANDIR
+ fi
+ gl_DIRENT_MODULE_INDICATOR([scandir])
+ gl_FUNC_SELECT
+ if test $REPLACE_SELECT = 1; then
+ AC_LIBOBJ([select])
+ fi
+ gl_SYS_SELECT_MODULE_INDICATOR([select])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([send])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([send])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([sendto])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([sendto])
+ gl_SERVENT
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([setsockopt])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([shutdown])
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
+ gl_SIGNAL_H
+ gl_SIGNBIT
+ if test $REPLACE_SIGNBIT = 1; then
+ AC_LIBOBJ([signbitf])
+ AC_LIBOBJ([signbitd])
+ AC_LIBOBJ([signbitl])
+ fi
+ gl_MATH_MODULE_INDICATOR([signbit])
+ gl_SIZE_MAX
+ gl_FUNC_SLEEP
+ if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
+ AC_LIBOBJ([sleep])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([sleep])
+ gl_FUNC_SNPRINTF
+ gl_STDIO_MODULE_INDICATOR([snprintf])
+ gl_MODULE_INDICATOR([snprintf])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([socket])
+ fi
+ # When this module is used, sockets may actually occur as file descriptors,
+ # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
+ m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+ m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+ AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+ fi
+ gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+ gl_SOCKETLIB
+ gl_SOCKETS
+ gl_TYPE_SOCKLEN_T
+ gt_TYPE_SSIZE_T
+ gl_STDALIGN_H
+ gl_STDARG_H
+ AM_STDBOOL_H
+ gl_STDDEF_H
+ gl_STDINT_H
+ gl_STDIO_H
+ gl_STDLIB_H
+ gl_STRCASE
+ if test $HAVE_STRCASECMP = 0; then
+ AC_LIBOBJ([strcasecmp])
+ gl_PREREQ_STRCASECMP
+ fi
+ if test $HAVE_STRNCASECMP = 0; then
+ AC_LIBOBJ([strncasecmp])
+ gl_PREREQ_STRNCASECMP
+ fi
+ gl_FUNC_STRCHRNUL
+ if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
+ AC_LIBOBJ([strchrnul])
+ gl_PREREQ_STRCHRNUL
+ fi
+ gl_STRING_MODULE_INDICATOR([strchrnul])
+ gl_FUNC_STRDUP_POSIX
+ if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+ AC_LIBOBJ([strdup])
+ gl_PREREQ_STRDUP
+ fi
+ gl_STRING_MODULE_INDICATOR([strdup])
+ gl_FUNC_STRERROR
+ if test $REPLACE_STRERROR = 1; then
+ AC_LIBOBJ([strerror])
+ fi
+ gl_MODULE_INDICATOR([strerror])
+ gl_STRING_MODULE_INDICATOR([strerror])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ AC_REQUIRE([gl_FUNC_STRERROR_0])
+ if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+ AC_LIBOBJ([strerror-override])
+ gl_PREREQ_SYS_H_WINSOCK2
+ fi
+ gl_HEADER_STRING_H
+ gl_HEADER_STRINGS_H
+ gl_FUNC_STRNDUP
+ if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
+ AC_LIBOBJ([strndup])
+ fi
+ gl_STRING_MODULE_INDICATOR([strndup])
+ gl_FUNC_STRNLEN
+ if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+ AC_LIBOBJ([strnlen])
+ gl_PREREQ_STRNLEN
+ fi
+ gl_STRING_MODULE_INDICATOR([strnlen])
+ gl_FUNC_STRTOK_R
+ if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
+ AC_LIBOBJ([strtok_r])
+ gl_PREREQ_STRTOK_R
+ fi
+ gl_STRING_MODULE_INDICATOR([strtok_r])
+ gl_FUNC_STRVERSCMP
+ if test $HAVE_STRVERSCMP = 0; then
+ AC_LIBOBJ([strverscmp])
+ gl_PREREQ_STRVERSCMP
+ fi
+ gl_STRING_MODULE_INDICATOR([strverscmp])
+ gl_HEADER_SYS_SELECT
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_SOCKET
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_STAT_H
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_TIME_H
+ AC_PROG_MKDIR_P
+ gl_SYS_TYPES_H
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_UIO
+ AC_PROG_MKDIR_P
+ gl_SYSEXITS
+ gl_THREADLIB
+ gl_HEADER_TIME_H
+ gl_TIME_R
+ if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
+ AC_LIBOBJ([time_r])
+ gl_PREREQ_TIME_R
+ fi
+ gl_TIME_MODULE_INDICATOR([time_r])
+ gl_TIMER_TIME
+ gl_TIMESPEC
+ gl_UNISTD_H
+ gl_VALGRIND_TESTS
+ gl_FUNC_VASNPRINTF
+ gl_FUNC_VASPRINTF
+ gl_STDIO_MODULE_INDICATOR([vasprintf])
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+ AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
+ gl_VERSION_ETC
+ gl_FUNC_VFPRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
+ gl_FUNC_VPRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([vprintf-posix])
+ gl_FUNC_VSNPRINTF
+ gl_STDIO_MODULE_INDICATOR([vsnprintf])
+ gl_WCHAR_H
+ gl_XSIZE
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -885,139 +896,132 @@ changequote([, ])dnl
AC_SUBST([gltests_WITNESS])
gl_module_indicator_condition=$gltests_WITNESS
m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
-AC_REQUIRE([AC_C_INLINE])
-gl_FUNC_DUP2
-if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
- AC_LIBOBJ([dup2])
- gl_PREREQ_DUP2
-fi
-gl_UNISTD_MODULE_INDICATOR([dup2])
-gl_ENVIRON
-gl_UNISTD_MODULE_INDICATOR([environ])
-gl_FCNTL_H
-gl_FUNC_FDOPEN
-if test $REPLACE_FDOPEN = 1; then
- AC_LIBOBJ([fdopen])
- gl_PREREQ_FDOPEN
-fi
-gl_STDIO_MODULE_INDICATOR([fdopen])
-gl_FUNC_UNGETC_WORKS
-gl_FUNC_UNGETC_WORKS
-gl_FUNC_UNGETC_WORKS
-gl_FUNC_UNGETC_WORKS
-gl_FUNC_FTRUNCATE
-if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
- AC_LIBOBJ([ftruncate])
- gl_PREREQ_FTRUNCATE
-fi
-gl_UNISTD_MODULE_INDICATOR([ftruncate])
-gl_FUNC_GETCWD_LGPL
-if test $REPLACE_GETCWD = 1; then
- AC_LIBOBJ([getcwd-lgpl])
-fi
-gl_UNISTD_MODULE_INDICATOR([getcwd])
-gl_FUNC_GETPAGESIZE
-if test $REPLACE_GETPAGESIZE = 1; then
- AC_LIBOBJ([getpagesize])
-fi
-gl_UNISTD_MODULE_INDICATOR([getpagesize])
-AC_REQUIRE([AC_C_INLINE])
-AC_C_BIGENDIAN
-AC_C_BIGENDIAN
-gl_INTTYPES_H
-gl_INTTYPES_INCOMPLETE
-gl_FUNC_IOCTL
-if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
- AC_LIBOBJ([ioctl])
-fi
-gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
-gl_DOUBLE_EXPONENT_LOCATION
-gl_FLOAT_EXPONENT_LOCATION
-gl_LONG_DOUBLE_EXPONENT_LOCATION
-AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
-gl_LOCK
-gl_FUNC_LSTAT
-if test $REPLACE_LSTAT = 1; then
- AC_LIBOBJ([lstat])
- gl_PREREQ_LSTAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([lstat])
-gl_MALLOCA
-dnl Check for prerequisites for memory fence checks.
-gl_FUNC_MMAP_ANON
-AC_CHECK_HEADERS_ONCE([sys/mman.h])
-AC_CHECK_FUNCS_ONCE([mprotect])
-gl_FUNC_OPEN
-if test $REPLACE_OPEN = 1; then
- AC_LIBOBJ([open])
- gl_PREREQ_OPEN
-fi
-gl_FCNTL_MODULE_INDICATOR([open])
-gl_PATHMAX
-gl_FUNC_PERROR
-if test $REPLACE_PERROR = 1; then
- AC_LIBOBJ([perror])
-fi
-gl_STRING_MODULE_INDICATOR([perror])
-gl_FUNC_PIPE
-if test $HAVE_PIPE = 0; then
- AC_LIBOBJ([pipe])
-fi
-gl_UNISTD_MODULE_INDICATOR([pipe])
-gl_FUNC_PUTENV
-if test $REPLACE_PUTENV = 1; then
- AC_LIBOBJ([putenv])
-fi
-gl_STDLIB_MODULE_INDICATOR([putenv])
-dnl Check for prerequisites for memory fence checks.
-gl_FUNC_MMAP_ANON
-AC_CHECK_HEADERS_ONCE([sys/mman.h])
-AC_CHECK_FUNCS_ONCE([mprotect])
-AC_CHECK_HEADERS_ONCE([sys/wait.h])
-gl_FUNC_SETENV
-if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
- AC_LIBOBJ([setenv])
-fi
-gl_STDLIB_MODULE_INDICATOR([setenv])
-AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
-AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
-AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
-AC_CHECK_DECLS_ONCE([alarm])
-gl_FUNC_STAT
-if test $REPLACE_STAT = 1; then
- AC_LIBOBJ([stat])
- gl_PREREQ_STAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([stat])
-gt_TYPE_WCHAR_T
-gt_TYPE_WINT_T
-gl_FUNC_STRERROR_R
-if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
- AC_LIBOBJ([strerror_r])
- gl_PREREQ_STRERROR_R
-fi
-gl_STRING_MODULE_INDICATOR([strerror_r])
-dnl Check for prerequisites for memory fence checks.
-gl_FUNC_MMAP_ANON
-AC_CHECK_HEADERS_ONCE([sys/mman.h])
-AC_CHECK_FUNCS_ONCE([mprotect])
-gl_FUNC_SYMLINK
-if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
- AC_LIBOBJ([symlink])
-fi
-gl_UNISTD_MODULE_INDICATOR([symlink])
-gl_SYS_IOCTL_H
-AC_PROG_MKDIR_P
-AC_CHECK_FUNCS_ONCE([shutdown])
-gl_FUNC_UNSETENV
-if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
- AC_LIBOBJ([unsetenv])
- gl_PREREQ_UNSETENV
-fi
-gl_STDLIB_MODULE_INDICATOR([unsetenv])
-gl_VALGRIND_TESTS
-abs_aux_dir=`cd "$ac_aux_dir"; pwd`
-AC_SUBST([abs_aux_dir])
+ gl_ENVIRON
+ gl_UNISTD_MODULE_INDICATOR([environ])
+ gl_FCNTL_H
+ gl_FUNC_FDOPEN
+ if test $REPLACE_FDOPEN = 1; then
+ AC_LIBOBJ([fdopen])
+ gl_PREREQ_FDOPEN
+ fi
+ gl_STDIO_MODULE_INDICATOR([fdopen])
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_FTRUNCATE
+ if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
+ AC_LIBOBJ([ftruncate])
+ gl_PREREQ_FTRUNCATE
+ fi
+ gl_UNISTD_MODULE_INDICATOR([ftruncate])
+ gl_FUNC_GETCWD_LGPL
+ if test $REPLACE_GETCWD = 1; then
+ AC_LIBOBJ([getcwd-lgpl])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([getcwd])
+ gl_FUNC_GETPAGESIZE
+ if test $REPLACE_GETPAGESIZE = 1; then
+ AC_LIBOBJ([getpagesize])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([getpagesize])
+ AC_C_BIGENDIAN
+ AC_C_BIGENDIAN
+ gl_INTTYPES_H
+ gl_INTTYPES_INCOMPLETE
+ gl_FUNC_IOCTL
+ if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
+ AC_LIBOBJ([ioctl])
+ fi
+ gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
+ gl_DOUBLE_EXPONENT_LOCATION
+ gl_FLOAT_EXPONENT_LOCATION
+ gl_LONG_DOUBLE_EXPONENT_LOCATION
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+ gl_LOCK
+ gl_FUNC_LSTAT
+ if test $REPLACE_LSTAT = 1; then
+ AC_LIBOBJ([lstat])
+ gl_PREREQ_LSTAT
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([lstat])
+ gl_MALLOCA
+ dnl Check for prerequisites for memory fence checks.
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_OPEN
+ if test $REPLACE_OPEN = 1; then
+ AC_LIBOBJ([open])
+ gl_PREREQ_OPEN
+ fi
+ gl_FCNTL_MODULE_INDICATOR([open])
+ gl_PATHMAX
+ gl_FUNC_PERROR
+ if test $REPLACE_PERROR = 1; then
+ AC_LIBOBJ([perror])
+ fi
+ gl_STRING_MODULE_INDICATOR([perror])
+ gl_FUNC_PIPE
+ if test $HAVE_PIPE = 0; then
+ AC_LIBOBJ([pipe])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([pipe])
+ gl_FUNC_PUTENV
+ if test $REPLACE_PUTENV = 1; then
+ AC_LIBOBJ([putenv])
+ gl_PREREQ_PUTENV
+ fi
+ gl_STDLIB_MODULE_INDICATOR([putenv])
+ dnl Check for prerequisites for memory fence checks.
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ AC_CHECK_HEADERS_ONCE([sys/wait.h])
+ gl_FUNC_SETENV
+ if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+ AC_LIBOBJ([setenv])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([setenv])
+ AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
+ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
+ AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
+ AC_CHECK_DECLS_ONCE([alarm])
+ gl_FUNC_STAT
+ if test $REPLACE_STAT = 1; then
+ AC_LIBOBJ([stat])
+ gl_PREREQ_STAT
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([stat])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ gl_FUNC_STRERROR_R
+ if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
+ AC_LIBOBJ([strerror_r])
+ gl_PREREQ_STRERROR_R
+ fi
+ gl_STRING_MODULE_INDICATOR([strerror_r])
+ dnl Check for prerequisites for memory fence checks.
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_SYMLINK
+ if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
+ AC_LIBOBJ([symlink])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([symlink])
+ gl_SYS_IOCTL_H
+ AC_PROG_MKDIR_P
+ AC_CHECK_FUNCS_ONCE([shutdown])
+ gl_FUNC_UNSETENV
+ if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+ AC_LIBOBJ([unsetenv])
+ gl_PREREQ_UNSETENV
+ fi
+ gl_STDLIB_MODULE_INDICATOR([unsetenv])
+ gl_VALGRIND_TESTS
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+ AC_SUBST([abs_aux_dir])
m4_popdef([gl_MODULE_INDICATOR_CONDITION])
m4_ifval(gltests_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
@@ -1156,6 +1160,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/dirname-lgpl.c
lib/dirname.h
lib/dosname.h
+ lib/dup2.c
lib/errno.in.h
lib/error.c
lib/error.h
@@ -1205,6 +1210,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/listen.c
lib/lseek.c
lib/malloc.c
+ lib/math.c
lib/math.in.h
lib/memchr.c
lib/memchr.valgrind
@@ -1277,6 +1283,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/strtok_r.c
lib/strverscmp.c
lib/sys_select.in.h
+ lib/sys_socket.c
lib/sys_socket.in.h
lib/sys_stat.in.h
lib/sys_time.in.h
@@ -1285,8 +1292,11 @@ AC_DEFUN([gl_FILE_LIST], [
lib/sysexits.in.h
lib/time.in.h
lib/time_r.c
+ lib/timespec.c
lib/timespec.h
+ lib/u64.c
lib/u64.h
+ lib/unistd.c
lib/unistd.in.h
lib/vasnprintf.c
lib/vasnprintf.h
@@ -1300,6 +1310,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/vsnprintf.c
lib/w32sock.h
lib/wchar.in.h
+ lib/xsize.c
lib/xsize.h
m4/00gnulib.m4
m4/alloca.m4
@@ -1324,6 +1335,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/exponentf.m4
m4/exponentl.m4
m4/extensions.m4
+ m4/extern-inline.m4
m4/fcntl-o.m4
m4/fcntl_h.m4
m4/fdopen.m4
@@ -1333,6 +1345,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/frexpl.m4
m4/fseek.m4
m4/fseeko.m4
+ m4/fseterr.m4
m4/fstat.m4
m4/ftell.m4
m4/ftello.m4
@@ -1649,8 +1662,8 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-vsnprintf.c
tests/test-wchar.c
tests/zerosize-ptr.h
+ tests=lib/binary-io.c
tests=lib/binary-io.h
- tests=lib/dup2.c
tests=lib/fcntl.in.h
tests=lib/fdopen.c
tests=lib/ftruncate.c
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4
index a09ffc1d1a..f3dea1a9f5 100644
--- a/gl/m4/gnulib-tool.m4
+++ b/gl/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
# gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2013 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.
diff --git a/gl/m4/hostent.m4 b/gl/m4/hostent.m4
index 51347755c6..72be876b79 100644
--- a/gl/m4/hostent.m4
+++ b/gl/m4/hostent.m4
@@ -1,5 +1,5 @@
# hostent.m4 serial 2
-dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2013 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.
diff --git a/gl/m4/iconv.m4 b/gl/m4/iconv.m4
index 6a47236c40..a503646569 100644
--- a/gl/m4/iconv.m4
+++ b/gl/m4/iconv.m4
@@ -1,5 +1,5 @@
# iconv.m4 serial 18 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2007-2013 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.
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index a60a2614dc..108d945677 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,5 +1,5 @@
# include_next.m4 serial 23
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2013 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.
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 1ebd960317..476f063fe9 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,5 +1,5 @@
# inet_ntop.m4 serial 19
-dnl Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2008-2013 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.
diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4
index e7b44e2829..e86db827a2 100644
--- a/gl/m4/inet_pton.m4
+++ b/gl/m4/inet_pton.m4
@@ -1,5 +1,5 @@
# inet_pton.m4 serial 17
-dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2013 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.
diff --git a/gl/m4/intdiv0.m4 b/gl/m4/intdiv0.m4
index 6d89aebed4..74d0e80d25 100644
--- a/gl/m4/intdiv0.m4
+++ b/gl/m4/intdiv0.m4
@@ -1,5 +1,5 @@
-# intdiv0.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2002, 2007-2008, 2010-2012 Free Software Foundation, Inc.
+# intdiv0.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2002, 2007-2008, 2010-2013 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.
@@ -18,7 +18,7 @@ AC_DEFUN([gt_INTDIV0],
changequote(,)dnl
case "$host_os" in
macos* | darwin[6-9]* | darwin[1-9][0-9]*)
- # On MacOS X 10.2 or newer, just assume the same as when cross-
+ # On Mac OS X 10.2 or newer, just assume the same as when cross-
# compiling. If we were to perform the real test, 1 Crash Report
# dialog window would pop up.
case "$host_cpu" in
diff --git a/gl/m4/intl.m4 b/gl/m4/intl.m4
index d67e29c5de..b8cc79f8a3 100644
--- a/gl/m4/intl.m4
+++ b/gl/m4/intl.m4
@@ -1,5 +1,5 @@
-# intl.m4 serial 17c
-dnl Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# intl.m4 serial 17d
+dnl Copyright (C) 1995-2013 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.
@@ -25,7 +25,7 @@ dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
AC_DEFUN([AM_INTL_SUBDIR],
[
AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([gt_GLIBC2])dnl
diff --git a/gl/m4/intldir.m4 b/gl/m4/intldir.m4
index b81de616ba..388ecd6fdd 100644
--- a/gl/m4/intldir.m4
+++ b/gl/m4/intldir.m4
@@ -1,5 +1,5 @@
# intldir.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2013 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.
diff --git a/gl/m4/intlmacosx.m4 b/gl/m4/intlmacosx.m4
index dc2ddfedfc..ab97d39f94 100644
--- a/gl/m4/intlmacosx.m4
+++ b/gl/m4/intlmacosx.m4
@@ -1,5 +1,5 @@
-# intlmacosx.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# intlmacosx.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2004-2013 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.
@@ -13,11 +13,11 @@ dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
-dnl Checks for special options needed on MacOS X.
+dnl Checks for special options needed on Mac OS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
[
- dnl Check for API introduced in MacOS X 10.2.
+ dnl Check for API introduced in Mac OS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
[gt_cv_func_CFPreferencesCopyAppValue],
[gt_save_LIBS="$LIBS"
@@ -31,9 +31,9 @@ AC_DEFUN([gt_INTL_MACOSX],
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
- [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi
- dnl Check for API introduced in MacOS X 10.3.
+ dnl Check for API introduced in Mac OS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
@@ -46,7 +46,7 @@ AC_DEFUN([gt_INTL_MACOSX],
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
- [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
diff --git a/gl/m4/intmax.m4 b/gl/m4/intmax.m4
index e3b251fd76..18733a52e7 100644
--- a/gl/m4/intmax.m4
+++ b/gl/m4/intmax.m4
@@ -1,5 +1,5 @@
# intmax.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2002-2005, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2005, 2008-2013 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.
diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4
index c1a4a75d83..6ea70531ca 100644
--- a/gl/m4/intmax_t.m4
+++ b/gl/m4/intmax_t.m4
@@ -1,5 +1,5 @@
# intmax_t.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/inttypes-pri.m4 b/gl/m4/inttypes-pri.m4
index 977206fae8..e5a1e05712 100644
--- a/gl/m4/inttypes-pri.m4
+++ b/gl/m4/inttypes-pri.m4
@@ -1,5 +1,5 @@
# inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-2013 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.
diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4
index eec4f41d03..3b483d39f5 100644
--- a/gl/m4/inttypes.m4
+++ b/gl/m4/inttypes.m4
@@ -1,5 +1,5 @@
# inttypes.m4 serial 26
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2013 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.
diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4
index 91c7bca62d..5f05ac58cd 100644
--- a/gl/m4/inttypes_h.m4
+++ b/gl/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2013 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.
diff --git a/gl/m4/ioctl.m4 b/gl/m4/ioctl.m4
index ec0b7289b3..1463af4227 100644
--- a/gl/m4/ioctl.m4
+++ b/gl/m4/ioctl.m4
@@ -1,5 +1,5 @@
# ioctl.m4 serial 4
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/isnand.m4 b/gl/m4/isnand.m4
index 54b64a452d..ee05e0f93c 100644
--- a/gl/m4/isnand.m4
+++ b/gl/m4/isnand.m4
@@ -1,5 +1,5 @@
# isnand.m4 serial 11
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/isnanf.m4 b/gl/m4/isnanf.m4
index 97f638a934..f01886a683 100644
--- a/gl/m4/isnanf.m4
+++ b/gl/m4/isnanf.m4
@@ -1,5 +1,5 @@
# isnanf.m4 serial 14
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/isnanl.m4 b/gl/m4/isnanl.m4
index 81469ab8c8..ed5bbf8ba2 100644
--- a/gl/m4/isnanl.m4
+++ b/gl/m4/isnanl.m4
@@ -1,5 +1,5 @@
# isnanl.m4 serial 17
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4
index a159f4ab2c..1e605e3d82 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -1,13 +1,14 @@
# Enable large files on systems where this is not the default.
-# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2013 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], [] ,[
+# The following implementation works around a problem in autoconf <= 2.69;
+# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
+# or configures them incorrectly in some cases.
+m4_version_prereq([2.70], [] ,[
# _AC_SYS_LARGEFILE_TEST_INCLUDES
# -------------------------------
@@ -25,9 +26,9 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-# CACHE-VAR,
-# DESCRIPTION,
-# PROLOGUE, [FUNCTION-BODY])
+# CACHE-VAR,
+# DESCRIPTION,
+# PROLOGUE, [FUNCTION-BODY])
# --------------------------------------------------------
m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
@@ -93,15 +94,11 @@ if test "$enable_largefile" != no; then
[_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])
+ AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
+ [Enable large inode numbers on Mac OS X 10.5.])
fi
])# AC_SYS_LARGEFILE
-
-])# m4_version_prereq 2.69
+])# m4_version_prereq 2.70
# Enable large files on systems where this is implemented by Gnulib, not by the
# system headers.
@@ -136,7 +133,7 @@ AC_DEFUN([gl_LARGEFILE],
*)
dnl Nothing to do on gnulib's side.
dnl A 64-bit off_t is
- dnl - already the default on MacOS X, FreeBSD, NetBSD, OpenBSD, IRIX,
+ dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX,
dnl OSF/1, Cygwin,
dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
dnl glibc, HP-UX, Solaris,
diff --git a/gl/m4/lcmessage.m4 b/gl/m4/lcmessage.m4
index 4ed0eb6e4c..d62a175fc0 100644
--- a/gl/m4/lcmessage.m4
+++ b/gl/m4/lcmessage.m4
@@ -1,5 +1,5 @@
# lcmessage.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2012 Free Software Foundation,
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/ld-output-def.m4 b/gl/m4/ld-output-def.m4
index 35116843b0..59895bc244 100644
--- a/gl/m4/ld-output-def.m4
+++ b/gl/m4/ld-output-def.m4
@@ -1,5 +1,5 @@
# ld-output-def.m4 serial 2
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/ld-version-script.m4 b/gl/m4/ld-version-script.m4
index 5ed93efdbb..63386f1739 100644
--- a/gl/m4/ld-version-script.m4
+++ b/gl/m4/ld-version-script.m4
@@ -1,5 +1,5 @@
# ld-version-script.m4 serial 3
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/ldexpl.m4 b/gl/m4/ldexpl.m4
index 11f20ca2a8..1223711469 100644
--- a/gl/m4/ldexpl.m4
+++ b/gl/m4/ldexpl.m4
@@ -1,5 +1,5 @@
-# ldexpl.m4 serial 15
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# ldexpl.m4 serial 16
+dnl Copyright (C) 2007-2013 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.
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_LDEXPL],
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
dnl Check whether it's declared.
- dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+ dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
LDEXPL_LIBM=
@@ -87,7 +87,7 @@ AC_DEFUN([gl_CHECK_LDEXPL_NO_LIBM],
])
dnl Test whether ldexpl() works on finite numbers (this fails on AIX 5.1
-dnl and MacOS X 10.4/PowerPC).
+dnl and Mac OS X 10.4/PowerPC).
AC_DEFUN([gl_FUNC_LDEXPL_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
diff --git a/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4
index 4e1374d9bc..c145e478e9 100644
--- a/gl/m4/lib-ld.m4
+++ b/gl/m4/lib-ld.m4
@@ -1,33 +1,39 @@
-# lib-ld.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 1996-2003, 2009-2012 Free Software Foundation, Inc.
+# lib-ld.m4 serial 6
+dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
+ acl_cv_prog_gnu_ld=yes
+ ;;
*)
- acl_cv_prog_gnu_ld=no ;;
+ acl_cv_prog_gnu_ld=no
+ ;;
esac])
with_gnu_ld=$acl_cv_prog_gnu_ld
])
-dnl From libtool-1.4. Sets the variable LD.
+dnl From libtool-2.4. Sets the variable LD.
AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld [default=no]])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
@@ -40,10 +46,11 @@ if test "${PATH_SEPARATOR+set}" != set; then
|| PATH_SEPARATOR=';'
}
fi
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
+ AC_MSG_CHECKING([for ld used by $CC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -53,11 +60,11 @@ if test "$GCC" = yes; then
esac
case $ac_prog in
# Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+ while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
@@ -78,23 +85,26 @@ else
fi
AC_CACHE_VAL([acl_cv_path_LD],
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
acl_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
+ test "$with_gnu_ld" != no && break
+ ;;
*)
- test "$with_gnu_ld" != yes && break ;;
+ test "$with_gnu_ld" != yes && break
+ ;;
esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$acl_save_ifs"
else
acl_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index d11b4b4350..073f04050c 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,5 +1,5 @@
# lib-link.m4 serial 26 (gettext-0.18.2)
-dnl Copyright (C) 2001-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2013 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.
diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4
index 007aa0532e..60908e8fb4 100644
--- a/gl/m4/lib-prefix.m4
+++ b/gl/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
# lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2013 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.
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4
index c0a620600a..d3fc1eff01 100644
--- a/gl/m4/lock.m4
+++ b/gl/m4/lock.m4
@@ -1,5 +1,5 @@
-# lock.m4 serial 11 (gettext-0.18.2)
-dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# lock.m4 serial 13 (gettext-0.18.2)
+dnl Copyright (C) 2005-2013 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.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_LOCK],
[
AC_REQUIRE([gl_THREADLIB])
if test "$gl_threads_api" = posix; then
- # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+ # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
# pthread_rwlock_* functions.
AC_CHECK_TYPE([pthread_rwlock_t],
[AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
@@ -35,7 +35,5 @@ return !x;
gl_PREREQ_LOCK
])
-# Prerequisites of lib/lock.c.
-AC_DEFUN([gl_PREREQ_LOCK], [
- AC_REQUIRE([AC_C_INLINE])
-])
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4
index b9c65c756e..3af6ab5aa1 100644
--- a/gl/m4/longlong.m4
+++ b/gl/m4/longlong.m4
@@ -1,5 +1,5 @@
# longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2013 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.
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index bdda7f659b..df9302af40 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,5 +1,5 @@
# lseek.m4 serial 10
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index b7335bda1b..5f4db64a42 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 25
+# serial 26
-# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,11 +27,7 @@ AC_DEFUN([gl_FUNC_LSTAT],
])
# Prerequisites of lib/lstat.c.
-AC_DEFUN([gl_PREREQ_LSTAT],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_LSTAT], [:])
AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 8fa48e93bc..4b24a0b115 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,5 @@
# malloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4
index 7841979f3c..791ce10d5f 100644
--- a/gl/m4/malloca.m4
+++ b/gl/m4/malloca.m4
@@ -1,5 +1,5 @@
# malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index 864fc85198..45a30afda7 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -1,5 +1,5 @@
-# manywarnings.m4 serial 4
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# manywarnings.m4 serial 5
+dnl Copyright (C) 2008-2013 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.
@@ -35,14 +35,12 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
# make sure your gcc understands it.
AC_DEFUN([gl_MANYWARN_ALL_GCC],
[
- dnl First, check if -Wno-missing-field-initializers is needed.
- dnl -Wmissing-field-initializers is implied by -W, but that issues
- dnl warnings with GCC version before 4.7, for the common idiom
- dnl of initializing types on the stack to zero, using { 0, }
+ dnl First, check for some issues that only occur when combining multiple
+ dnl gcc warning categories.
AC_REQUIRE([AC_PROG_CC])
if test -n "$GCC"; then
- dnl First, check -W -Werror -Wno-missing-field-initializers is supported
+ dnl Check if -W -Werror -Wno-missing-field-initializers is supported
dnl with the current $CC $CFLAGS $CPPFLAGS.
AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported])
AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [
@@ -77,107 +75,150 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
])
AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
fi
+
+ dnl Next, check if -Werror -Wuninitialized is useful with the
+ dnl user's choice of $CFLAGS; some versions of gcc warn that it
+ dnl has no effect if -O is not also used
+ AC_MSG_CHECKING([whether -Wuninitialized is supported])
+ AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wuninitialized"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_uninitialized_supported=yes],
+ [gl_cv_cc_uninitialized_supported=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported])
+
fi
+ # List all gcc warning categories.
gl_manywarn_set=
for gl_manywarn_item in \
- -Wall \
-W \
- -Wformat-y2k \
- -Wformat-nonliteral \
- -Wformat-security \
- -Winit-self \
- -Wmissing-include-dirs \
- -Wswitch-default \
- -Wswitch-enum \
- -Wunused \
- -Wunknown-pragmas \
- -Wstrict-aliasing \
- -Wstrict-overflow \
- -Wsystem-headers \
- -Wfloat-equal \
- -Wtraditional \
- -Wtraditional-conversion \
- -Wdeclaration-after-statement \
- -Wundef \
- -Wshadow \
- -Wunsafe-loop-optimizations \
- -Wpointer-arith \
+ -Wabi \
+ -Waddress \
+ -Wall \
+ -Warray-bounds \
+ -Wattributes \
-Wbad-function-cast \
- -Wc++-compat \
- -Wcast-qual \
- -Wcast-align \
- -Wwrite-strings \
- -Wconversion \
- -Wsign-conversion \
- -Wlogical-op \
- -Waggregate-return \
- -Wstrict-prototypes \
- -Wold-style-definition \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wmissing-noreturn \
- -Wmissing-format-attribute \
- -Wpacked \
- -Wpadded \
- -Wredundant-decls \
- -Wnested-externs \
- -Wunreachable-code \
- -Winline \
- -Winvalid-pch \
- -Wlong-long \
- -Wvla \
- -Wvolatile-register-var \
- -Wdisabled-optimization \
- -Wstack-protector \
- -Woverlength-strings \
-Wbuiltin-macro-redefined \
- -Wmudflap \
- -Wpacked-bitfield-compat \
- -Wsync-nand \
- ; do
- gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
- done
- # The following are not documented in the manual but are included in
- # output from gcc --help=warnings.
- for gl_manywarn_item in \
- -Wattributes \
+ -Wcast-align \
+ -Wchar-subscripts \
+ -Wclobbered \
+ -Wcomment \
+ -Wcomments \
-Wcoverage-mismatch \
- -Wunused-macros \
- ; do
- gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
- done
- # More warnings from gcc 4.6.2 --help=warnings.
- for gl_manywarn_item in \
- -Wabi \
-Wcpp \
-Wdeprecated \
-Wdeprecated-declarations \
+ -Wdisabled-optimization \
-Wdiv-by-zero \
-Wdouble-promotion \
+ -Wempty-body \
-Wendif-labels \
+ -Wenum-compare \
-Wextra \
-Wformat-contains-nul \
-Wformat-extra-args \
+ -Wformat-nonliteral \
+ -Wformat-security \
+ -Wformat-y2k \
-Wformat-zero-length \
-Wformat=2 \
+ -Wfree-nonheap-object \
+ -Wignored-qualifiers \
+ -Wimplicit \
+ -Wimplicit-function-declaration \
+ -Wimplicit-int \
+ -Winit-self \
+ -Winline \
+ -Wint-to-pointer-cast \
+ -Winvalid-memory-model \
+ -Winvalid-pch \
+ -Wjump-misses-init \
+ -Wlogical-op \
+ -Wmain \
+ -Wmaybe-uninitialized \
+ -Wmissing-braces \
+ -Wmissing-declarations \
+ -Wmissing-field-initializers \
+ -Wmissing-format-attribute \
+ -Wmissing-include-dirs \
+ -Wmissing-noreturn \
+ -Wmissing-parameter-type \
+ -Wmissing-prototypes \
+ -Wmudflap \
-Wmultichar \
+ -Wnarrowing \
+ -Wnested-externs \
+ -Wnonnull \
-Wnormalized=nfc \
+ -Wold-style-declaration \
+ -Wold-style-definition \
-Woverflow \
+ -Woverlength-strings \
+ -Woverride-init \
+ -Wpacked \
+ -Wpacked-bitfield-compat \
+ -Wparentheses \
+ -Wpointer-arith \
+ -Wpointer-sign \
-Wpointer-to-int-cast \
-Wpragmas \
+ -Wreturn-type \
+ -Wsequence-point \
+ -Wshadow \
+ -Wsizeof-pointer-memaccess \
+ -Wstack-protector \
+ -Wstrict-aliasing \
+ -Wstrict-overflow \
+ -Wstrict-prototypes \
-Wsuggest-attribute=const \
+ -Wsuggest-attribute=format \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=pure \
+ -Wswitch \
+ -Wswitch-default \
+ -Wsync-nand \
+ -Wsystem-headers \
-Wtrampolines \
+ -Wtrigraphs \
+ -Wtype-limits \
+ -Wuninitialized \
+ -Wunknown-pragmas \
+ -Wunreachable-code \
+ -Wunsafe-loop-optimizations \
+ -Wunused \
+ -Wunused-but-set-parameter \
+ -Wunused-but-set-variable \
+ -Wunused-function \
+ -Wunused-label \
+ -Wunused-local-typedefs \
+ -Wunused-macros \
+ -Wunused-parameter \
+ -Wunused-result \
+ -Wunused-value \
+ -Wunused-variable \
+ -Wvarargs \
+ -Wvariadic-macros \
+ -Wvector-operation-performance \
+ -Wvla \
+ -Wvolatile-register-var \
+ -Wwrite-strings \
+ \
; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
- # Disable the missing-field-initializers warning if needed
+ # Disable specific options as needed.
if test "$gl_cv_cc_nomfi_needed" = yes; then
gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
fi
+ if test "$gl_cv_cc_uninitialized_supported" = no; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+ fi
+
$1=$gl_manywarn_set
])
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index 90d248aecc..bf0845fd1d 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,5 +1,5 @@
-# math_h.m4 serial 113
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# math_h.m4 serial 114
+dnl Copyright (C) 2007-2013 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.
@@ -8,7 +8,6 @@ AC_DEFUN([gl_MATH_H],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([math.h])
- AC_REQUIRE([AC_C_INLINE])
AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4
index 004029450f..2d8abe75d7 100644
--- a/gl/m4/memchr.m4
+++ b/gl/m4/memchr.m4
@@ -1,5 +1,5 @@
# memchr.m4 serial 12
-dnl Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2013 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.
diff --git a/gl/m4/memmem.m4 b/gl/m4/memmem.m4
index 88f9e20521..9102e77e01 100644
--- a/gl/m4/memmem.m4
+++ b/gl/m4/memmem.m4
@@ -1,5 +1,5 @@
# memmem.m4 serial 24
-dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2013 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.
diff --git a/gl/m4/mempcpy.m4 b/gl/m4/mempcpy.m4
index c926941db4..a48f2d107c 100644
--- a/gl/m4/mempcpy.m4
+++ b/gl/m4/mempcpy.m4
@@ -1,5 +1,5 @@
# mempcpy.m4 serial 11
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4
index 45c6230def..2b210cdc67 100644
--- a/gl/m4/minmax.m4
+++ b/gl/m4/minmax.m4
@@ -1,5 +1,5 @@
# minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2013 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.
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index 579323f15a..9b60ddfa47 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
-# mmap-anon.m4 serial 9
-dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+# mmap-anon.m4 serial 10
+dnl Copyright (C) 2005, 2007, 2009-2013 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.
@@ -9,7 +9,7 @@ dnl with or without modifications, as long as this notice is preserved.
# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
# and MAP_ANON exist and have the same value.
# - On HP-UX, only MAP_ANONYMOUS exists.
-# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
+# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
# used.
diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4
index 40f612a612..d5b66d45bd 100644
--- a/gl/m4/mode_t.m4
+++ b/gl/m4/mode_t.m4
@@ -1,5 +1,5 @@
# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 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.
diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4
index 8db4617599..9a6a47a740 100644
--- a/gl/m4/msvc-inval.m4
+++ b/gl/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2013 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.
diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4
index 012505070e..a39618a415 100644
--- a/gl/m4/msvc-nothrow.m4
+++ b/gl/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2013 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.
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index b424dce652..552ec7e716 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,12 +1,12 @@
-# multiarch.m4 serial 6
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# multiarch.m4 serial 7
+dnl Copyright (C) 2008-2013 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.
# Determine whether the compiler is or may be producing universal binaries.
#
-# On MacOS X 10.5 and later systems, the user can create libraries and
+# On Mac OS X 10.5 and later systems, the user can create libraries and
# executables that work on multiple system types--known as "fat" or
# "universal" binaries--by specifying multiple '-arch' options to the
# compiler but only a single '-arch' option to the preprocessor. Like
diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4
index e0f3ee8654..2c69f999fe 100644
--- a/gl/m4/netdb_h.m4
+++ b/gl/m4/netdb_h.m4
@@ -1,5 +1,5 @@
# netdb_h.m4 serial 11
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4
index e1813886a5..21971b29e4 100644
--- a/gl/m4/netinet_in_h.m4
+++ b/gl/m4/netinet_in_h.m4
@@ -1,5 +1,5 @@
# netinet_in_h.m4 serial 5
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2013 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.
diff --git a/gl/m4/nls.m4 b/gl/m4/nls.m4
index 0866677c0f..8f8a147bec 100644
--- a/gl/m4/nls.m4
+++ b/gl/m4/nls.m4
@@ -1,5 +1,5 @@
# nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2012 Free Software Foundation,
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
index 08ef825499..105b884f18 100644
--- a/gl/m4/nocrash.m4
+++ b/gl/m4/nocrash.m4
@@ -1,5 +1,5 @@
-# nocrash.m4 serial 3
-dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
+# nocrash.m4 serial 4
+dnl Copyright (C) 2005, 2009-2013 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.
@@ -18,7 +18,7 @@ dnl int main() { nocrash_init(); ... }
AC_DEFUN([GL_NOCRASH],[[
#include <stdlib.h>
#if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on MacOS X. */
+/* Avoid a crash on Mac OS X. */
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/thread_status.h>
diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4
index dfca2dfd23..d355d01313 100644
--- a/gl/m4/off_t.m4
+++ b/gl/m4/off_t.m4
@@ -1,5 +1,5 @@
# off_t.m4 serial 1
-dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2013 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.
diff --git a/gl/m4/open.m4 b/gl/m4/open.m4
index c85971dc1a..a6cb1019a7 100644
--- a/gl/m4/open.m4
+++ b/gl/m4/open.m4
@@ -1,5 +1,5 @@
-# open.m4 serial 13
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# open.m4 serial 14
+dnl Copyright (C) 2007-2013 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.
@@ -86,7 +86,6 @@ changequote([,])dnl
# Prerequisites of lib/open.c.
AC_DEFUN([gl_PREREQ_OPEN],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
:
])
diff --git a/gl/m4/opendir.m4 b/gl/m4/opendir.m4
index 08da440b38..d411680561 100644
--- a/gl/m4/opendir.m4
+++ b/gl/m4/opendir.m4
@@ -1,5 +1,5 @@
# opendir.m4 serial 2
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2013 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.
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4
index 011786129e..e11bf57a08 100644
--- a/gl/m4/pathmax.m4
+++ b/gl/m4/pathmax.m4
@@ -1,5 +1,5 @@
# pathmax.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/perror.m4 b/gl/m4/perror.m4
index 369a824e73..42549ba212 100644
--- a/gl/m4/perror.m4
+++ b/gl/m4/perror.m4
@@ -1,5 +1,5 @@
# perror.m4 serial 6
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/pipe.m4 b/gl/m4/pipe.m4
index 37aef116a8..5831283324 100644
--- a/gl/m4/pipe.m4
+++ b/gl/m4/pipe.m4
@@ -1,5 +1,5 @@
# pipe.m4 serial 2
-dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2013 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.
diff --git a/gl/m4/po.m4 b/gl/m4/po.m4
index 05d8f7be47..5fde6f292e 100644
--- a/gl/m4/po.m4
+++ b/gl/m4/po.m4
@@ -1,5 +1,5 @@
-# po.m4 serial 17b
-dnl Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# po.m4 serial 17c
+dnl Copyright (C) 1995-2013 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.
@@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
[
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
AC_REQUIRE([AM_NLS])dnl
dnl Release version of the gettext macros. This is used to ensure that
diff --git a/gl/m4/printf-frexp.m4 b/gl/m4/printf-frexp.m4
index de5d641fe2..8b373b1910 100644
--- a/gl/m4/printf-frexp.m4
+++ b/gl/m4/printf-frexp.m4
@@ -1,5 +1,5 @@
# printf-frexp.m4 serial 5
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/printf-frexpl.m4 b/gl/m4/printf-frexpl.m4
index 55dd6bc18e..f1ce4c8a3d 100644
--- a/gl/m4/printf-frexpl.m4
+++ b/gl/m4/printf-frexpl.m4
@@ -1,5 +1,5 @@
-# printf-frexpl.m4 serial 9
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# printf-frexpl.m4 serial 10
+dnl Copyright (C) 2007, 2009-2013 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.
@@ -28,7 +28,7 @@ AC_DEFUN([gl_FUNC_PRINTF_FREXPL],
AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
[Define if the frexpl function is available in libc.])
dnl Also check whether it's declared.
- dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
fi
@@ -40,7 +40,7 @@ AC_DEFUN([gl_FUNC_PRINTF_FREXPL],
AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1],
[Define if the ldexpl function is available in libc.])
dnl Also check whether it's declared.
- dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+ dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
;;
esac
diff --git a/gl/m4/printf-posix.m4 b/gl/m4/printf-posix.m4
index 0b9da4206c..d7dfb60f89 100644
--- a/gl/m4/printf-posix.m4
+++ b/gl/m4/printf-posix.m4
@@ -1,5 +1,5 @@
# printf-posix.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2013 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.
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4
index d75aca0742..ef44f78518 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,5 +1,5 @@
-# printf.m4 serial 48
-dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
+# printf.m4 serial 50
+dnl Copyright (C) 2003, 2007-2013 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.
@@ -63,7 +63,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@@ -222,7 +222,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 6.
freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
darwin*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on HP-UX >= 11.
@@ -507,14 +507,14 @@ int main ()
if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
|| buf[0] == '0')
result |= 8;
- /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
if (sprintf (buf, "%.1a", 1.999) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
&& strcmp (buf, "0x2.0p+0") != 0
&& strcmp (buf, "0x4.0p-1") != 0
&& strcmp (buf, "0x8.0p-2") != 0))
result |= 16;
- /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
if (sprintf (buf, "%.1La", 1.999L) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
@@ -590,7 +590,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 6.
freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
darwin*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on Solaris >= 2.10.
@@ -1028,8 +1028,9 @@ int main()
changequote([,])dnl
])])
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
- (./conftest
+ (./conftest 2>&AS_MESSAGE_LOG_FD
result=$?
+ _AS_ECHO_LOG([\$? = $result])
if test $result != 0 && test $result != 77; then result=1; fi
exit $result
) >/dev/null 2>/dev/null
@@ -1043,7 +1044,7 @@ changequote([,])dnl
fi
rm -fr conftest*
else
- dnl A universal build on Apple MacOS X platforms.
+ dnl A universal build on Apple Mac OS X platforms.
dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
dnl But we need a configuration result that is valid in both modes.
gl_cv_func_printf_enomem="guessing no"
@@ -1137,7 +1138,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@@ -1236,7 +1237,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@@ -1317,7 +1318,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on Solaris >= 2.6.
@@ -1459,7 +1460,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on Cygwin.
@@ -1539,8 +1540,8 @@ dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . .
dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . .
dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . .
-dnl MacOS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
-dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
+dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
+dnl Mac OS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . .
dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . .
dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . .
diff --git a/gl/m4/progtest.m4 b/gl/m4/progtest.m4
index ce3abbc718..7b3912329d 100644
--- a/gl/m4/progtest.m4
+++ b/gl/m4/progtest.m4
@@ -1,5 +1,5 @@
# progtest.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1996-2003, 2005, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2005, 2008-2013 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.
diff --git a/gl/m4/putenv.m4 b/gl/m4/putenv.m4
index b971b1204d..03ed4f97db 100644
--- a/gl/m4/putenv.m4
+++ b/gl/m4/putenv.m4
@@ -1,5 +1,5 @@
# putenv.m4 serial 19
-dnl Copyright (C) 2002-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2013 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.
@@ -48,3 +48,9 @@ AC_DEFUN([gl_FUNC_PUTENV],
;;
esac
])
+
+# Prerequisites of lib/putenv.c.
+AC_DEFUN([gl_PREREQ_PUTENV],
+[
+ AC_CHECK_FUNCS([_putenv])
+])
diff --git a/gl/m4/rawmemchr.m4 b/gl/m4/rawmemchr.m4
index 19301644a9..8c500547c5 100644
--- a/gl/m4/rawmemchr.m4
+++ b/gl/m4/rawmemchr.m4
@@ -1,5 +1,5 @@
# rawmemchr.m4 serial 2
-dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2013 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.
diff --git a/gl/m4/read-file.m4 b/gl/m4/read-file.m4
index 3665247294..491bba8ea3 100644
--- a/gl/m4/read-file.m4
+++ b/gl/m4/read-file.m4
@@ -1,5 +1,5 @@
# read-file.m4 serial 3
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2013 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.
diff --git a/gl/m4/readdir.m4 b/gl/m4/readdir.m4
index 437ec08c0a..4269bb486a 100644
--- a/gl/m4/readdir.m4
+++ b/gl/m4/readdir.m4
@@ -1,5 +1,5 @@
# readdir.m4 serial 1
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2013 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.
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index 954c2f0e58..d477fb470b 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,5 +1,5 @@
# realloc.m4 serial 13
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/scandir.m4 b/gl/m4/scandir.m4
index 24a3af410b..a7834ae1ec 100644
--- a/gl/m4/scandir.m4
+++ b/gl/m4/scandir.m4
@@ -1,5 +1,5 @@
# scandir.m4 serial 2
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 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.
diff --git a/gl/m4/select.m4 b/gl/m4/select.m4
index 037b3d3cfc..d025355f9e 100644
--- a/gl/m4/select.m4
+++ b/gl/m4/select.m4
@@ -1,5 +1,5 @@
-# select.m4 serial 6
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# select.m4 serial 7
+dnl Copyright (C) 2009-2013 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.
@@ -46,6 +46,44 @@ changequote([,])dnl
*yes) ;;
*) REPLACE_SELECT=1 ;;
esac
+
+ dnl On FreeBSD 8.2, select() doesn't always reject bad fds.
+ AC_CACHE_CHECK([whether select detects invalid fds],
+ [gl_cv_func_select_detects_ebadf],
+ [
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <unistd.h>
+#include <errno.h>
+]],[[
+ fd_set set;
+ dup2(0, 16);
+ FD_ZERO(&set);
+ FD_SET(16, &set);
+ close(16);
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 5;
+ return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
+]])], [gl_cv_func_select_detects_ebadf=yes],
+ [gl_cv_func_select_detects_ebadf=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_select_detects_ebadf="guessing no" ;;
+ esac
+ ])
+ ])
+ case $gl_cv_func_select_detects_ebadf in
+ *yes) ;;
+ *) REPLACE_SELECT=1 ;;
+ esac
fi
dnl Determine the needed libraries.
diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4
index 21da957f32..01c037a879 100644
--- a/gl/m4/servent.m4
+++ b/gl/m4/servent.m4
@@ -1,5 +1,5 @@
# servent.m4 serial 2
-dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2013 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.
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index e1931e7eb2..cb5351a07b 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,5 +1,5 @@
# setenv.m4 serial 26
-dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2013 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.
diff --git a/gl/m4/signal_h.m4 b/gl/m4/signal_h.m4
index ed4d7306ee..3de9f27ad5 100644
--- a/gl/m4/signal_h.m4
+++ b/gl/m4/signal_h.m4
@@ -1,5 +1,5 @@
# signal_h.m4 serial 18
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/signbit.m4 b/gl/m4/signbit.m4
index e9877f68f5..d58caaf058 100644
--- a/gl/m4/signbit.m4
+++ b/gl/m4/signbit.m4
@@ -1,5 +1,5 @@
-# signbit.m4 serial 12
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# signbit.m4 serial 13
+dnl Copyright (C) 2007-2013 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.
@@ -170,7 +170,7 @@ double m0d = -p0d;
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use another constant expression instead.
But that expression does not work on other platforms, such as when
- cross-compiling to PowerPC on MacOS X 10.5. */
+ cross-compiling to PowerPC on Mac OS X 10.5. */
long double p0l = 0.0L;
#if defined __hpux || defined __sgi
long double m0l = -LDBL_MIN * LDBL_MIN;
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4
index 5a8162bc1e..4b247abc0b 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,5 +1,5 @@
# size_max.m4 serial 10
-dnl Copyright (C) 2003, 2005-2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2013 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.
diff --git a/gl/m4/sleep.m4 b/gl/m4/sleep.m4
index 49197faf1a..a27baa6d5b 100644
--- a/gl/m4/sleep.m4
+++ b/gl/m4/sleep.m4
@@ -1,5 +1,5 @@
# sleep.m4 serial 7
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4
index de94eddfd1..3698e84409 100644
--- a/gl/m4/snprintf.m4
+++ b/gl/m4/snprintf.m4
@@ -1,5 +1,5 @@
# snprintf.m4 serial 6
-dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2013 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.
diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4
index 92a1af2246..b08a72f630 100644
--- a/gl/m4/socketlib.m4
+++ b/gl/m4/socketlib.m4
@@ -1,5 +1,5 @@
# socketlib.m4 serial 1
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4
index e3738d906f..b407391cd1 100644
--- a/gl/m4/sockets.m4
+++ b/gl/m4/sockets.m4
@@ -1,5 +1,5 @@
# sockets.m4 serial 7
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4
index a4ab43b333..e3efd6ef70 100644
--- a/gl/m4/socklen.m4
+++ b/gl/m4/socklen.m4
@@ -1,5 +1,5 @@
# socklen.m4 serial 10
-dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2013 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.
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4
index 5f97c3e3d8..89557b18d9 100644
--- a/gl/m4/sockpfaf.m4
+++ b/gl/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
# sockpfaf.m4 serial 8
-dnl Copyright (C) 2004, 2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009-2013 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.
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
index 209d64c823..6338134344 100644
--- a/gl/m4/ssize_t.m4
+++ b/gl/m4/ssize_t.m4
@@ -1,5 +1,5 @@
# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2013 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.
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index a8b79f5bcb..2456297acb 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,6 +1,6 @@
-# serial 10
+# serial 11
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -68,8 +68,4 @@ AC_DEFUN([gl_FUNC_STAT],
])
# Prerequisites of lib/stat.c.
-AC_DEFUN([gl_PREREQ_STAT],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_STAT], [:])
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index 6659c9c3ec..3d7993dbec 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -1,6 +1,6 @@
# Check for stdalign.h that conforms to C11.
-dnl Copyright 2011-2012 Free Software Foundation, Inc.
+dnl Copyright 2011-2013 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.
diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4
index 5c313cb8c9..c087f61ed3 100644
--- a/gl/m4/stdarg.m4
+++ b/gl/m4/stdarg.m4
@@ -1,5 +1,5 @@
# stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2013 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.
diff --git a/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4
index eabfa64579..80d5559ab4 100644
--- a/gl/m4/stdbool.m4
+++ b/gl/m4/stdbool.m4
@@ -1,6 +1,6 @@
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2013 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.
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index cc11609609..5da8ab1ec4 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
# stddef_h.m4 serial 4
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 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.
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index 28d342ea23..27cdcdb9a5 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,5 +1,5 @@
# stdint.m4 serial 43
-dnl Copyright (C) 2001-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2013 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.
diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4
index 581de96049..511ab4e9cc 100644
--- a/gl/m4/stdint_h.m4
+++ b/gl/m4/stdint_h.m4
@@ -1,5 +1,5 @@
# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2013 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.
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index b03393b957..ebade067d9 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 41
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# stdio_h.m4 serial 43
+dnl Copyright (C) 2007-2013 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.
@@ -7,13 +7,14 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDIO_H],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_NEXT_HEADERS([stdio.h])
dnl No need to create extra modules for these functions. Everyone who uses
dnl <stdio.h> likely needs them.
GNULIB_FSCANF=1
+ gl_MODULE_INDICATOR([fscanf])
GNULIB_SCANF=1
+ gl_MODULE_INDICATOR([scanf])
GNULIB_FGETC=1
GNULIB_GETC=1
GNULIB_GETCHAR=1
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index ab43728ace..2027ab3c1d 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 41
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 42
+dnl Copyright (C) 2007-2013 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.
@@ -22,7 +22,7 @@ AC_DEFUN([gl_STDLIB_H],
]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
posix_openpt ptsname ptsname_r random random_r realpath rpmatch
- setenv setstate setstate_r srandom srandom_r
+ secure_getenv setenv setstate setstate_r srandom srandom_r
strtod strtoll strtoull unlockpt unsetenv])
])
@@ -60,6 +60,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
+ GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
@@ -88,6 +89,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
+ HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV])
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV])
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
@@ -102,6 +104,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+ REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4
index 717fa9c323..22bf57c95b 100644
--- a/gl/m4/strcase.m4
+++ b/gl/m4/strcase.m4
@@ -1,5 +1,5 @@
# strcase.m4 serial 11
-dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2013 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.
diff --git a/gl/m4/strchrnul.m4 b/gl/m4/strchrnul.m4
index d3dfb9afa2..b59eda9d72 100644
--- a/gl/m4/strchrnul.m4
+++ b/gl/m4/strchrnul.m4
@@ -1,5 +1,5 @@
# strchrnul.m4 serial 9
-dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2013 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.
diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4
index db0c8c1db9..efe2d5719f 100644
--- a/gl/m4/strdup.m4
+++ b/gl/m4/strdup.m4
@@ -1,6 +1,6 @@
# strdup.m4 serial 13
-dnl Copyright (C) 2002-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index 1c96e526da..3989844b22 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,5 +1,5 @@
# strerror.m4 serial 17
-dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2013 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.
diff --git a/gl/m4/strerror_r.m4 b/gl/m4/strerror_r.m4
index 5bdf0abe73..341f9836b5 100644
--- a/gl/m4/strerror_r.m4
+++ b/gl/m4/strerror_r.m4
@@ -1,5 +1,5 @@
-# strerror_r.m4 serial 14
-dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
+# strerror_r.m4 serial 15
+dnl Copyright (C) 2002, 2007-2013 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.
@@ -76,7 +76,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
dnl HP-UX 11.31 strerror_r always fails when the buffer length argument
dnl is less than 80.
dnl FreeBSD 8.s strerror_r claims failure on 0
- dnl MacOS X 10.5 strerror_r treats 0 like -1
+ dnl Mac OS X 10.5 strerror_r treats 0 like -1
dnl Solaris 10 strerror_r corrupts errno on failure
AC_CACHE_CHECK([whether strerror_r works],
[gl_cv_func_strerror_r_works],
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index 5677e092d4..cc5fbbb32f 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -1,6 +1,6 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2013 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.
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4
index a057e1c8bd..76ef2424e7 100644
--- a/gl/m4/strings_h.m4
+++ b/gl/m4/strings_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <strings.h>.
# serial 6
-# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2013 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.
diff --git a/gl/m4/strndup.m4 b/gl/m4/strndup.m4
index bdde5fe1d2..a1f82743f3 100644
--- a/gl/m4/strndup.m4
+++ b/gl/m4/strndup.m4
@@ -1,5 +1,5 @@
-# strndup.m4 serial 20
-dnl Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
+# strndup.m4 serial 21
+dnl Copyright (C) 2002-2003, 2005-2013 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.
@@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_STRNDUP],
[AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#include <string.h>
#include <stdlib.h>]], [[
-#ifndef HAVE_DECL_STRNDUP
+#if !HAVE_DECL_STRNDUP
extern
#ifdef __cplusplus
"C"
diff --git a/gl/m4/strnlen.m4 b/gl/m4/strnlen.m4
index d97e30759f..eae82b7722 100644
--- a/gl/m4/strnlen.m4
+++ b/gl/m4/strnlen.m4
@@ -1,5 +1,5 @@
# strnlen.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/strtok_r.m4 b/gl/m4/strtok_r.m4
index 60e33a695f..cbc9339b8b 100644
--- a/gl/m4/strtok_r.m4
+++ b/gl/m4/strtok_r.m4
@@ -1,5 +1,5 @@
# strtok_r.m4 serial 13
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/strverscmp.m4 b/gl/m4/strverscmp.m4
index d744647041..110daf2396 100644
--- a/gl/m4/strverscmp.m4
+++ b/gl/m4/strverscmp.m4
@@ -1,5 +1,5 @@
# strverscmp.m4 serial 8
-dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2013 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.
diff --git a/gl/m4/symlink.m4 b/gl/m4/symlink.m4
index cfd90ec2b6..82ede2a4f7 100644
--- a/gl/m4/symlink.m4
+++ b/gl/m4/symlink.m4
@@ -1,7 +1,7 @@
# serial 6
# See if we need to provide symlink replacement.
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 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.
diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4
index 94a2669339..8705a4cd47 100644
--- a/gl/m4/sys_ioctl_h.m4
+++ b/gl/m4/sys_ioctl_h.m4
@@ -1,5 +1,5 @@
# sys_ioctl_h.m4 serial 10
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4
index eaf056a79a..496232851f 100644
--- a/gl/m4/sys_select_h.m4
+++ b/gl/m4/sys_select_h.m4
@@ -1,5 +1,5 @@
# sys_select_h.m4 serial 20
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2013 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.
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index 8d4e7e1ebb..94863776df 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
-# sys_socket_h.m4 serial 22
-dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# sys_socket_h.m4 serial 23
+dnl Copyright (C) 2005-2013 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.
@@ -10,7 +10,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
[
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_C_INLINE])
dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
dnl old-style declarations (with return type 'int' instead of 'ssize_t')
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index f45dee1dc4..6dd3d99b17 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 27 -*- Autoconf -*-
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 28 -*- Autoconf -*-
+dnl Copyright (C) 2006-2013 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.
@@ -11,9 +11,6 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
- dnl For the mkdir substitute.
- AC_REQUIRE([AC_C_INLINE])
-
dnl Check for broken stat macros.
AC_REQUIRE([AC_HEADER_STAT])
diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4
index 26eaf8ea7f..0ac71ac5e9 100644
--- a/gl/m4/sys_time_h.m4
+++ b/gl/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/time.h>.
# serial 8
-# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2013 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.
@@ -52,7 +52,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only
dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is
dnl smaller than the 'time_t' type mandated by POSIX.
- AC_CACHE_CHECK([for correct struct timeval.tv_sec member],
+ dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but
+ dnl that is good enough.
+ AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member],
[gl_cv_sys_struct_timeval_tv_sec],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
@@ -65,7 +67,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
#endif
]],
[[static struct timeval x;
- typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1];
+ typedef int verify_tv_sec_type[
+ sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
+ ];
]])],
[gl_cv_sys_struct_timeval_tv_sec=yes],
[gl_cv_sys_struct_timeval_tv_sec=no])
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index f11eef2fe8..6132727f87 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,5 +1,5 @@
# sys_types_h.m4 serial 4
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2013 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.
diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4
index ddf844b727..c75cbbd0b9 100644
--- a/gl/m4/sys_uio_h.m4
+++ b/gl/m4/sys_uio_h.m4
@@ -1,5 +1,5 @@
# sys_uio_h.m4 serial 1
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2013 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.
diff --git a/gl/m4/sysexits.m4 b/gl/m4/sysexits.m4
index c5741d2573..bd8abaa0d4 100644
--- a/gl/m4/sysexits.m4
+++ b/gl/m4/sysexits.m4
@@ -1,5 +1,5 @@
# sysexits.m4 serial 6
-dnl Copyright (C) 2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005, 2007, 2009-2013 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.
diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4
index 9cedb67006..26bdeb58a3 100644
--- a/gl/m4/threadlib.m4
+++ b/gl/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 9 (gettext-0.18.2)
-dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# threadlib.m4 serial 10 (gettext-0.18.2)
+dnl Copyright (C) 2005-2013 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.
@@ -319,50 +319,50 @@ AC_DEFUN([gl_DISABLE_THREADS], [
dnl Survey of platforms:
dnl
-dnl Platform Available Compiler Supports test-lock
-dnl flavours option weak result
-dnl --------------- --------- --------- -------- ---------
-dnl Linux 2.4/glibc posix -lpthread Y OK
+dnl Platform Available Compiler Supports test-lock
+dnl flavours option weak result
+dnl --------------- --------- --------- -------- ---------
+dnl Linux 2.4/glibc posix -lpthread Y OK
dnl
-dnl GNU Hurd/glibc posix
+dnl GNU Hurd/glibc posix
dnl
-dnl FreeBSD 5.3 posix -lc_r Y
-dnl posix -lkse ? Y
-dnl posix -lpthread ? Y
-dnl posix -lthr Y
+dnl FreeBSD 5.3 posix -lc_r Y
+dnl posix -lkse ? Y
+dnl posix -lpthread ? Y
+dnl posix -lthr Y
dnl
-dnl FreeBSD 5.2 posix -lc_r Y
-dnl posix -lkse Y
-dnl posix -lthr Y
+dnl FreeBSD 5.2 posix -lc_r Y
+dnl posix -lkse Y
+dnl posix -lthr Y
dnl
-dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
+dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
dnl
-dnl NetBSD 1.6 --
+dnl NetBSD 1.6 --
dnl
-dnl OpenBSD 3.4 posix -lpthread Y OK
+dnl OpenBSD 3.4 posix -lpthread Y OK
dnl
-dnl MacOS X 10.[123] posix -lpthread Y OK
+dnl Mac OS X 10.[123] posix -lpthread Y OK
dnl
-dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
-dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
dnl
-dnl HP-UX 11 posix -lpthread N (cc) OK
+dnl HP-UX 11 posix -lpthread N (cc) OK
dnl Y (gcc)
dnl
-dnl IRIX 6.5 posix -lpthread Y 0.5
+dnl IRIX 6.5 posix -lpthread Y 0.5
dnl
-dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
+dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
dnl
-dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
+dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
dnl -lpthread (gcc) Y
dnl
-dnl Cygwin posix -lpthread Y OK
+dnl Cygwin posix -lpthread Y OK
dnl
-dnl Any of the above pth -lpth 0.0
+dnl Any of the above pth -lpth 0.0
dnl
-dnl Mingw windows N OK
+dnl Mingw windows N OK
dnl
-dnl BeOS 5 --
+dnl BeOS 5 --
dnl
dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
dnl turned off:
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index b88da76463..3b83900534 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -1,8 +1,8 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
-# serial 6
+# serial 7
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
])
-dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared
+dnl Check whether 'struct timespec' is declared
dnl in time.h, sys/time.h, or pthread.h.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
diff --git a/gl/m4/time_r.m4 b/gl/m4/time_r.m4
index c3579fb3b8..c388a8312f 100644
--- a/gl/m4/time_r.m4
+++ b/gl/m4/time_r.m4
@@ -1,6 +1,6 @@
dnl Reentrant time functions: localtime_r, gmtime_r.
-dnl Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-2013 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.
@@ -17,7 +17,7 @@ AC_DEFUN([gl_TIME_R],
dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is
dnl not defined.
- AC_CHECK_DECLS_ONCE([localtime_r])
+ AC_CHECK_DECLS([localtime_r], [], [], [[#include <time.h>]])
if test $ac_cv_have_decl_localtime_r = no; then
HAVE_DECL_LOCALTIME_R=0
fi
diff --git a/gl/m4/timer_time.m4 b/gl/m4/timer_time.m4
index d6e0efeb61..ea018f9a01 100644
--- a/gl/m4/timer_time.m4
+++ b/gl/m4/timer_time.m4
@@ -1,5 +1,5 @@
-# timer_time.m4 serial 1
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# timer_time.m4 serial 2
+dnl Copyright (C) 2011-2013 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.
@@ -33,7 +33,7 @@ AC_DEFUN([gl_TIMER_TIME],
#endif
#endif
],
- [LIB_TIMER_TIME="$LIBMULTITHREAD $LIB_TIMER_TIME"])
+ [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"])
AC_CHECK_FUNCS([timer_settime])
LIBS=$gl_saved_libs
])
diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4
index 597b9c2d1a..399404b59b 100644
--- a/gl/m4/timespec.m4
+++ b/gl/m4/timespec.m4
@@ -1,6 +1,6 @@
-#serial 14
+#serial 15
-# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -8,8 +8,4 @@
dnl From Jim Meyering
-AC_DEFUN([gl_TIMESPEC],
-[
- dnl Prerequisites of lib/timespec.h.
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_TIMESPEC], [:])
diff --git a/gl/m4/uintmax_t.m4 b/gl/m4/uintmax_t.m4
index 983b675e71..c6ff80067b 100644
--- a/gl/m4/uintmax_t.m4
+++ b/gl/m4/uintmax_t.m4
@@ -1,5 +1,5 @@
# uintmax_t.m4 serial 12
-dnl Copyright (C) 1997-2004, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2007-2013 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.
diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4
index 9bc1ce7635..4e3577a8a0 100644
--- a/gl/m4/ungetc.m4
+++ b/gl/m4/ungetc.m4
@@ -1,5 +1,5 @@
# ungetc.m4 serial 3
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 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.
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 7e7651b9d2..32dcfa5820 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 65
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# unistd_h.m4 serial 66
+dnl Copyright (C) 2006-2013 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.
@@ -11,7 +11,6 @@ AC_DEFUN([gl_UNISTD_H],
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_CHECK_NEXT_HEADERS([unistd.h])
if test $ac_cv_header_unistd_h = yes; then
diff --git a/gl/m4/valgrind-tests.m4 b/gl/m4/valgrind-tests.m4
index 6afd14dabf..590ac9d686 100644
--- a/gl/m4/valgrind-tests.m4
+++ b/gl/m4/valgrind-tests.m4
@@ -1,5 +1,5 @@
# valgrind-tests.m4 serial 3
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index 0ce11da13b..d730e435a9 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 35
-dnl Copyright (C) 2002-2004, 2006-2012 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 36
+dnl Copyright (C) 2002-2004, 2006-2013 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.
@@ -55,7 +55,6 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
# Prerequisites of lib/vasnprintf.c.
AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_FUNC_ALLOCA])
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
AC_REQUIRE([gt_TYPE_WCHAR_T])
diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4
index 205ceea6dc..c214ff1120 100644
--- a/gl/m4/vasprintf.m4
+++ b/gl/m4/vasprintf.m4
@@ -1,5 +1,5 @@
# vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4
index 4c6c6786a1..5dbef8e5ba 100644
--- a/gl/m4/version-etc.m4
+++ b/gl/m4/version-etc.m4
@@ -1,5 +1,5 @@
# version-etc.m4 serial 1
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 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.
diff --git a/gl/m4/vfprintf-posix.m4 b/gl/m4/vfprintf-posix.m4
index 441bd57cd2..47a4645b9f 100644
--- a/gl/m4/vfprintf-posix.m4
+++ b/gl/m4/vfprintf-posix.m4
@@ -1,5 +1,5 @@
# vfprintf-posix.m4 serial 14
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4
index 7b24d39e68..6cbd7e5f24 100644
--- a/gl/m4/visibility.m4
+++ b/gl/m4/visibility.m4
@@ -1,5 +1,5 @@
-# visibility.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2005, 2008, 2010-2012 Free Software Foundation, Inc.
+# visibility.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2005, 2008, 2010-2013 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.
@@ -12,7 +12,7 @@ dnl __attribute__((__visibility__("hidden"))) and
dnl __attribute__((__visibility__("default"))).
dnl Does *not* test for __visibility__("protected") - which has tricky
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
-dnl MacOS X.
+dnl Mac OS X.
dnl Does *not* test for __visibility__("internal") - which has processor
dnl dependent semantics.
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
diff --git a/gl/m4/vprintf-posix.m4 b/gl/m4/vprintf-posix.m4
index 0320352d02..8a4eb19cfb 100644
--- a/gl/m4/vprintf-posix.m4
+++ b/gl/m4/vprintf-posix.m4
@@ -1,5 +1,5 @@
# vprintf-posix.m4 serial 3
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4
index 22ec57be50..4900764eef 100644
--- a/gl/m4/vsnprintf.m4
+++ b/gl/m4/vsnprintf.m4
@@ -1,5 +1,5 @@
# vsnprintf.m4 serial 6
-dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2013 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.
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index a77802eb91..e43beebd9a 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
# warn-on-use.m4 serial 5
-dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2013 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.
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index 28b8294ef0..4b2ac38501 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,5 +1,5 @@
# warnings.m4 serial 7
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 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.
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index c7a8b2d781..bedb15a44a 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 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.
diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4
index 534735d8c6..e1e1e699d6 100644
--- a/gl/m4/wchar_t.m4
+++ b/gl/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2013 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.
diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
index 3260cce323..d7cd3db936 100644
--- a/gl/m4/wint_t.m4
+++ b/gl/m4/wint_t.m4
@@ -1,5 +1,5 @@
# wint_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2013 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.
diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4
index b3b7feebfa..8ea9f2cd30 100644
--- a/gl/m4/xsize.m4
+++ b/gl/m4/xsize.m4
@@ -1,5 +1,5 @@
-# xsize.m4 serial 4
-dnl Copyright (C) 2003-2004, 2008-2012 Free Software Foundation, Inc.
+# xsize.m4 serial 5
+dnl Copyright (C) 2003-2004, 2008-2013 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.
@@ -8,6 +8,5 @@ AC_DEFUN([gl_XSIZE],
[
dnl Prerequisites of lib/xsize.h.
AC_REQUIRE([gl_SIZE_MAX])
- AC_REQUIRE([AC_C_INLINE])
AC_CHECK_HEADERS([stdint.h])
])
diff --git a/gl/malloc.c b/gl/malloc.c
index e0d5c89d18..908735d278 100644
--- a/gl/malloc.c
+++ b/gl/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2013 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
diff --git a/gl/math.c b/gl/math.c
new file mode 100644
index 0000000000..ddb2ded530
--- /dev/null
+++ b/gl/math.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_MATH_INLINE _GL_EXTERN_INLINE
+#include "math.h"
diff --git a/gl/math.in.h b/gl/math.in.h
index 0625777acc..7189819b04 100644
--- a/gl/math.in.h
+++ b/gl/math.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <math.h>.
- Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2007-2013 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
@@ -28,6 +28,10 @@
#ifndef _@GUARD_PREFIX@_MATH_H
#define _@GUARD_PREFIX@_MATH_H
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_MATH_INLINE
+# define _GL_MATH_INLINE _GL_INLINE
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -78,17 +82,17 @@ func (long double l) \
classification macros with an argument of real-floating (that is,
one of float, double, or long double). */
#define _GL_WARN_REAL_FLOATING_DECL(func) \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## f (float f) \
{ \
return func (f); \
} \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## d (double d) \
{ \
return func (d); \
} \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## l (long double l) \
{ \
return func (l); \
@@ -124,7 +128,7 @@ static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq;
/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
choke on the expression 0.0 / 0.0. */
# if defined __DECC || defined _MSC_VER
-static float
+_GL_MATH_INLINE float
_NaN ()
{
static float zero = 0.0f;
@@ -2265,6 +2269,7 @@ _GL_WARN_REAL_FLOATING_DECL (signbit);
# endif
#endif
+_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_MATH_H */
#endif /* _@GUARD_PREFIX@_MATH_H */
diff --git a/gl/memchr.c b/gl/memchr.c
index b8fb0efb95..3db38a94cd 100644
--- a/gl/memchr.c
+++ b/gl/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2013
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gl/memmem.c b/gl/memmem.c
index 29ffcc038a..99f3a674b8 100644
--- a/gl/memmem.c
+++ b/gl/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/mempcpy.c b/gl/mempcpy.c
index a97fe42295..5582368ed4 100644
--- a/gl/mempcpy.c
+++ b/gl/mempcpy.c
@@ -1,5 +1,5 @@
/* Copy memory area and return pointer after last written byte.
- Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2009-2013 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
diff --git a/gl/minmax.h b/gl/minmax.h
index 75a9b3cc7e..dc649af7ea 100644
--- a/gl/minmax.h
+++ b/gl/minmax.h
@@ -1,5 +1,5 @@
/* MIN, MAX macros.
- Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2012 Free Software
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c
index ba76a7ea66..72a6b6ee89 100644
--- a/gl/msvc-inval.c
+++ b/gl/msvc-inval.c
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h
index eb6930b1c6..dcb0353dcd 100644
--- a/gl/msvc-inval.h
+++ b/gl/msvc-inval.h
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c
index e5cf181a04..8d65472a82 100644
--- a/gl/msvc-nothrow.c
+++ b/gl/msvc-nothrow.c
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/msvc-nothrow.h b/gl/msvc-nothrow.h
index 2b71945b0b..5f521813df 100644
--- a/gl/msvc-nothrow.h
+++ b/gl/msvc-nothrow.h
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/netdb.in.h b/gl/netdb.in.h
index e4366f84f4..0da1800ad9 100644
--- a/gl/netdb.in.h
+++ b/gl/netdb.in.h
@@ -1,5 +1,5 @@
/* Provide a netdb.h header file for systems lacking it (read: MinGW).
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/netinet_in.in.h b/gl/netinet_in.in.h
index 99b493677d..b456c4f991 100644
--- a/gl/netinet_in.in.h
+++ b/gl/netinet_in.in.h
@@ -1,5 +1,5 @@
/* Substitute for <netinet/in.h>.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/opendir.c b/gl/opendir.c
index 50e25e305a..de0ea5a24f 100644
--- a/gl/opendir.c
+++ b/gl/opendir.c
@@ -1,5 +1,5 @@
/* Start reading the entries of a directory.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 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
diff --git a/gl/printf-args.c b/gl/printf-args.c
index 47b20dc238..c27e6bc6b7 100644
--- a/gl/printf-args.c
+++ b/gl/printf-args.c
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2012 Free Software
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/printf-args.h b/gl/printf-args.h
index aa811aff54..2a9c2a3f87 100644
--- a/gl/printf-args.h
+++ b/gl/printf-args.h
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2012 Free Software
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/printf-frexp.c b/gl/printf-frexp.c
index eb47205a26..1a7b0c438e 100644
--- a/gl/printf-frexp.c
+++ b/gl/printf-frexp.c
@@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/printf-frexp.h b/gl/printf-frexp.h
index 985d7d29e5..3976b73686 100644
--- a/gl/printf-frexp.h
+++ b/gl/printf-frexp.h
@@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/printf-frexpl.c b/gl/printf-frexpl.c
index 568d2ffc90..26987a7bd1 100644
--- a/gl/printf-frexpl.c
+++ b/gl/printf-frexpl.c
@@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/printf-frexpl.h b/gl/printf-frexpl.h
index 341ddedc4a..3768b0915e 100644
--- a/gl/printf-frexpl.h
+++ b/gl/printf-frexpl.h
@@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/printf-parse.c b/gl/printf-parse.c
index 308a1755b1..23cacc1dab 100644
--- a/gl/printf-parse.c
+++ b/gl/printf-parse.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2013 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
@@ -401,7 +401,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
cp++;
}
#if defined __APPLE__ && defined __MACH__
- /* On MacOS X 10.3, PRIdMAX is defined as "qd".
+ /* On Mac OS X 10.3, PRIdMAX is defined as "qd".
We cannot change it to "lld" because PRIdMAX must also
be understood by the system's printf routines. */
else if (*cp == 'q')
diff --git a/gl/printf-parse.h b/gl/printf-parse.h
index 577099a50e..d8474bee15 100644
--- a/gl/printf-parse.h
+++ b/gl/printf-parse.h
@@ -1,5 +1,5 @@
/* Parse printf format string.
- Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2012 Free Software
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/progname.c b/gl/progname.c
index bdd4dd74d4..0c195e521a 100644
--- a/gl/progname.c
+++ b/gl/progname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/progname.h b/gl/progname.h
index a75a02e6da..b4f3c2778a 100644
--- a/gl/progname.h
+++ b/gl/progname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2004, 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/rawmemchr.c b/gl/rawmemchr.c
index c94a0e10a1..a0298ce64e 100644
--- a/gl/rawmemchr.c
+++ b/gl/rawmemchr.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/read-file.c b/gl/read-file.c
index 0d5ab8b6ab..bcc5a92f1d 100644
--- a/gl/read-file.c
+++ b/gl/read-file.c
@@ -1,5 +1,5 @@
/* read-file.c -- read file contents into a string
- Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson and Bruno Haible.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/read-file.h b/gl/read-file.h
index a1142b8ce3..507135f24b 100644
--- a/gl/read-file.h
+++ b/gl/read-file.h
@@ -1,5 +1,5 @@
/* read-file.h -- read file contents into a string
- Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/readdir.c b/gl/readdir.c
index 28aff9ccb4..3db00806db 100644
--- a/gl/readdir.c
+++ b/gl/readdir.c
@@ -1,5 +1,5 @@
/* Read the next entry of a directory.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/realloc.c b/gl/realloc.c
index 99556ccf9c..b51010a621 100644
--- a/gl/realloc.c
+++ b/gl/realloc.c
@@ -1,6 +1,6 @@
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2012 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/recv.c b/gl/recv.c
index c6e2c002be..544f90d6ca 100644
--- a/gl/recv.c
+++ b/gl/recv.c
@@ -1,6 +1,6 @@
/* recv.c --- wrappers for Windows recv function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/recvfrom.c b/gl/recvfrom.c
index 2f0ecdb57c..891259e171 100644
--- a/gl/recvfrom.c
+++ b/gl/recvfrom.c
@@ -1,6 +1,6 @@
/* recvfrom.c --- wrappers for Windows recvfrom function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/scandir.c b/gl/scandir.c
index 2f4dd18e8b..d035400def 100644
--- a/gl/scandir.c
+++ b/gl/scandir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-1998, 2000, 2002-2003, 2009-2012 Free Software
+/* Copyright (C) 1992-1998, 2000, 2002-2003, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/select.c b/gl/select.c
index d6acb5c371..c02558e1a2 100644
--- a/gl/select.c
+++ b/gl/select.c
@@ -1,7 +1,7 @@
/* Emulation for select(2)
Contributed by Paolo Bonzini.
- Copyright 2008-2012 Free Software Foundation, Inc.
+ Copyright 2008-2013 Free Software Foundation, Inc.
This file is part of gnulib.
@@ -507,6 +507,8 @@ restart:
#include <sys/select.h>
#include <stddef.h> /* NULL */
+#include <errno.h>
+#include <unistd.h>
#undef select
@@ -514,6 +516,23 @@ int
rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
struct timeval *timeout)
{
+ int i;
+
+ /* FreeBSD 8.2 has a bug: it does not always detect invalid fds. */
+ if (nfds < 0 || nfds > FD_SETSIZE)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ for (i = 0; i < nfds; i++)
+ {
+ if (((rfds && FD_ISSET (i, rfds))
+ || (wfds && FD_ISSET (i, wfds))
+ || (xfds && FD_ISSET (i, xfds)))
+ && dup2 (i, i) != i)
+ return -1;
+ }
+
/* Interix 3.5 has a bug: it does not support nfds == 0. */
if (nfds == 0)
{
diff --git a/gl/send.c b/gl/send.c
index 83fe8e6780..293d65ead8 100644
--- a/gl/send.c
+++ b/gl/send.c
@@ -1,6 +1,6 @@
/* send.c --- wrappers for Windows send function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/sendto.c b/gl/sendto.c
index ab575f4d28..10ed39c083 100644
--- a/gl/sendto.c
+++ b/gl/sendto.c
@@ -1,6 +1,6 @@
/* sendto.c --- wrappers for Windows sendto function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/setsockopt.c b/gl/setsockopt.c
index 9f414d5813..7865aaff45 100644
--- a/gl/setsockopt.c
+++ b/gl/setsockopt.c
@@ -1,6 +1,6 @@
/* setsockopt.c --- wrappers for Windows setsockopt function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/shutdown.c b/gl/shutdown.c
index ea19421bb2..343a0dbf05 100644
--- a/gl/shutdown.c
+++ b/gl/shutdown.c
@@ -1,6 +1,6 @@
/* shutdown.c --- wrappers for Windows shutdown function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/signal.in.h b/gl/signal.in.h
index e0f0554bdb..54849504d7 100644
--- a/gl/signal.in.h
+++ b/gl/signal.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <signal.h>.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 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
@@ -55,7 +55,7 @@
#ifndef _@GUARD_PREFIX@_SIGNAL_H
#define _@GUARD_PREFIX@_SIGNAL_H
-/* MacOS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
+/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
pthread_sigmask in <pthread.h>, not in <signal.h>.
But avoid namespace pollution on glibc systems.*/
#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
@@ -197,7 +197,7 @@ typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
/* Test whether a given signal is contained in a signal set. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigismember
# endif
@@ -210,7 +210,7 @@ _GL_CXXALIASWARN (sigismember);
/* Initialize a signal set to the empty set. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigemptyset
# endif
@@ -222,7 +222,7 @@ _GL_CXXALIASWARN (sigemptyset);
/* Add a signal to a signal set. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigaddset
# endif
@@ -235,7 +235,7 @@ _GL_CXXALIASWARN (sigaddset);
/* Remove a signal from a signal set. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigdelset
# endif
@@ -248,7 +248,7 @@ _GL_CXXALIASWARN (sigdelset);
/* Fill a signal set with all possible signals. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigfillset
# endif
diff --git a/gl/signbitd.c b/gl/signbitd.c
index 7629ff5005..7a434f8eea 100644
--- a/gl/signbitd.c
+++ b/gl/signbitd.c
@@ -1,5 +1,5 @@
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/signbitf.c b/gl/signbitf.c
index f99f992091..f133be57f5 100644
--- a/gl/signbitf.c
+++ b/gl/signbitf.c
@@ -1,5 +1,5 @@
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/signbitl.c b/gl/signbitl.c
index 35afcf1ae7..9e1e900e16 100644
--- a/gl/signbitl.c
+++ b/gl/signbitl.c
@@ -1,5 +1,5 @@
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/size_max.h b/gl/size_max.h
index 9642441959..5f3312404b 100644
--- a/gl/size_max.h
+++ b/gl/size_max.h
@@ -1,5 +1,5 @@
/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/sleep.c b/gl/sleep.c
index 9a4b9400cc..4c97d7dfa5 100644
--- a/gl/sleep.c
+++ b/gl/sleep.c
@@ -1,5 +1,5 @@
/* Pausing execution of the current thread.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/snprintf.c b/gl/snprintf.c
index 390844272a..9c4ab3f2b4 100644
--- a/gl/snprintf.c
+++ b/gl/snprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2013 Free Software Foundation, Inc.
Written by Simon Josefsson and Paul Eggert.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/socket.c b/gl/socket.c
index c668df07d1..dcbd07af6c 100644
--- a/gl/socket.c
+++ b/gl/socket.c
@@ -1,6 +1,6 @@
/* socket.c --- wrappers for Windows socket function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/sockets.c b/gl/sockets.c
index 3daec454d3..ae961482aa 100644
--- a/gl/sockets.c
+++ b/gl/sockets.c
@@ -1,6 +1,6 @@
/* sockets.c --- wrappers for Windows socket functions
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/sockets.h b/gl/sockets.h
index 2efa413627..1570ad8450 100644
--- a/gl/sockets.h
+++ b/gl/sockets.h
@@ -1,6 +1,6 @@
/* sockets.h - wrappers for Windows socket functions
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/stdalign.in.h b/gl/stdalign.in.h
index 8fba6943f6..c3a67321b0 100644
--- a/gl/stdalign.in.h
+++ b/gl/stdalign.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C11 <stdalign.h>.
- Copyright 2011-2012 Free Software Foundation, Inc.
+ Copyright 2011-2013 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
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index 53104a6192..7484842dbd 100644
--- a/gl/stdarg.in.h
+++ b/gl/stdarg.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/stdbool.in.h b/gl/stdbool.in.h
index ed1f9aa488..7c1577277f 100644
--- a/gl/stdbool.in.h
+++ b/gl/stdbool.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
@@ -66,24 +66,19 @@
# undef true
#endif
-/* For the sake of symbolic names in gdb, we define true and false as
- enum constants, not only as macros.
- It is tempting to write
- typedef enum { false = 0, true = 1 } _Bool;
- so that gdb prints values of type 'bool' symbolically. But if we do
- this, values of type '_Bool' may promote to 'int' or 'unsigned int'
- (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
- (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
- enum; this ensures that '_Bool' promotes to 'int'. */
-#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+#ifdef __cplusplus
+# define _Bool bool
+# define bool bool
+#else
+# if defined __BEOS__ && !defined __HAIKU__
/* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */
-# if !@HAVE__BOOL@
+# if !@HAVE__BOOL@
typedef bool _Bool;
-# endif
-#else
-# if !defined __GNUC__
+# endif
+# else
+# if !defined __GNUC__
/* If @HAVE__BOOL@:
Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
the built-in _Bool type is used. See
@@ -103,19 +98,35 @@ typedef bool _Bool;
"Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
The only benefit of the enum, debuggability, is not important
with these compilers. So use 'signed char' and no enum. */
-# define _Bool signed char
-# else
+# define _Bool signed char
+# else
/* With this compiler, trust the _Bool type if the compiler has it. */
-# if !@HAVE__BOOL@
+# if !@HAVE__BOOL@
+ /* For the sake of symbolic names in gdb, define true and false as
+ enum constants, not only as macros.
+ It is tempting to write
+ typedef enum { false = 0, true = 1 } _Bool;
+ so that gdb prints values of type 'bool' symbolically. But then
+ values of type '_Bool' might promote to 'int' or 'unsigned int'
+ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+ (see ISO C 99 6.3.1.1.(2)). So add a negative value to the
+ enum; this ensures that '_Bool' promotes to 'int'. */
typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+# endif
# endif
# endif
+# define bool _Bool
#endif
-#define bool _Bool
/* The other macros must be usable in preprocessor directives. */
-#define false 0
-#define true 1
+#ifdef __cplusplus
+# define false false
+# define true true
+#else
+# define false 0
+# define true 1
+#endif
+
#define __bool_true_false_are_defined 1
#endif /* _GL_STDBOOL_H */
diff --git a/gl/stddef.in.h b/gl/stddef.in.h
index 17fcaea2bf..40f0536aae 100644
--- a/gl/stddef.in.h
+++ b/gl/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index 59c00d59c0..2db8b2e378 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2013 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -39,7 +39,7 @@
Ideally we should test __BIONIC__ here, but it is only defined after
<sys/cdefs.h> has been included; hence test __ANDROID__ instead. */
#if defined __ANDROID__ \
- && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
+ && defined _SYS_TYPES_H_ && !defined __need_size_t
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
#else
@@ -83,7 +83,7 @@
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
AIX 5.2 <sys/types.h> isn't needed and causes troubles.
- MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+ Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
relies on the system <stdint.h> definitions, so include
<sys/types.h> after @NEXT_STDINT_H@. */
#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h
index 4935795374..e00600a158 100644
--- a/gl/stdio-impl.h
+++ b/gl/stdio-impl.h
@@ -1,5 +1,5 @@
/* Implementation details of FILE streams.
- Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2013 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
@@ -28,7 +28,7 @@
#include <errno.h> /* For detecting Plan9. */
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
# if defined __DragonFly__ /* DragonFly */
/* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
@@ -66,7 +66,7 @@
/* More fields, not relevant here. */
};
# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
-# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */
+# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
# define fp_ub fp_->_ub
# endif
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index b1b543dee7..d6af99ca77 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2013 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
@@ -575,21 +575,17 @@ _GL_CXXALIAS_RPL (fwrite, size_t,
_GL_CXXALIAS_SYS (fwrite, size_t,
(const void *ptr, size_t s, size_t n, FILE *stream));
-/* Work around glibc bug 11959
+/* Work around bug 11959 when fortifying glibc 2.4 through 2.15
<http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
which sometimes causes an unwanted diagnostic for fwrite calls.
- This affects only function declaration attributes, so it's not
- needed for C++. */
-# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
-static inline size_t _GL_ARG_NONNULL ((1, 4))
-rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
-{
- size_t r = fwrite (ptr, s, n, stream);
- (void) r;
- return r;
-}
+ This affects only function declaration attributes under certain
+ versions of gcc, and is not needed for C++. */
+# if (0 < __USE_FORTIFY_LEVEL \
+ && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
+ && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
+ && !defined __cplusplus)
# undef fwrite
-# define fwrite rpl_fwrite
+# define fwrite(a, b, c, d) ({size_t __r = fwrite (a, b, c, d); __r; })
# endif
# endif
_GL_CXXALIASWARN (fwrite);
@@ -1333,7 +1329,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
"POSIX compliance");
#endif
-
#endif /* _@GUARD_PREFIX@_STDIO_H */
#endif /* _@GUARD_PREFIX@_STDIO_H */
#endif
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index b546133c3a..c9552480e5 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2013 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
@@ -20,8 +20,9 @@
#endif
@PRAGMA_COLUMNS@
-#if defined __need_malloc_and_calloc
-/* Special invocation convention inside glibc header files. */
+#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
+/* Special invocation conventions inside some gnulib header files,
+ and inside some glibc header files, respectively. */
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
@@ -87,8 +88,8 @@ struct random_data
#endif
#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
-/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
-/* On MacOS X 10.5, only <unistd.h> declares mkstemps. */
+/* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
+/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
/* But avoid namespace pollution on glibc systems and native Windows. */
# include <unistd.h>
@@ -457,10 +458,19 @@ _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
#if @GNULIB_PTSNAME@
/* Return the pathname of the pseudo-terminal slave associated with
the master FD is open on, or NULL on errors. */
-# if !@HAVE_PTSNAME@
+# if @REPLACE_PTSNAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ptsname
+# define ptsname rpl_ptsname
+# endif
+_GL_FUNCDECL_RPL (ptsname, char *, (int fd));
+_GL_CXXALIAS_RPL (ptsname, char *, (int fd));
+# else
+# if !@HAVE_PTSNAME@
_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
-# endif
+# endif
_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
+# endif
_GL_CXXALIASWARN (ptsname);
#elif defined GNULIB_POSIXCHECK
# undef ptsname
@@ -757,6 +767,22 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
# endif
#endif
+#if @GNULIB_SECURE_GETENV@
+/* Look up NAME in the environment, returning 0 in insecure situations. */
+# if !@HAVE_SECURE_GETENV@
+_GL_FUNCDECL_SYS (secure_getenv, char *,
+ (char const *name) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
+_GL_CXXALIASWARN (secure_getenv);
+#elif defined GNULIB_POSIXCHECK
+# undef secure_getenv
+# if HAVE_RAW_DECL_SECURE_GETENV
+_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
+ "use gnulib module secure_getenv for portability");
+# endif
+#endif
+
#if @GNULIB_SETENV@
/* Set NAME to VALUE in the environment.
If REPLACE is nonzero, overwrite an existing value. */
diff --git a/gl/str-two-way.h b/gl/str-two-way.h
index af8f77b512..707145dbdd 100644
--- a/gl/str-two-way.h
+++ b/gl/str-two-way.h
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
diff --git a/gl/strcasecmp.c b/gl/strcasecmp.c
index 77ca288722..0f0a742ffe 100644
--- a/gl/strcasecmp.c
+++ b/gl/strcasecmp.c
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2013 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
diff --git a/gl/strchrnul.c b/gl/strchrnul.c
index 1be4249e3c..f6b072274a 100644
--- a/gl/strchrnul.c
+++ b/gl/strchrnul.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007-2013 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
diff --git a/gl/strdup.c b/gl/strdup.c
index a3f8c863f3..5826ab02af 100644
--- a/gl/strdup.c
+++ b/gl/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2012 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/strerror-override.c b/gl/strerror-override.c
index 9f55cfa9ac..d0ed2fb86a 100644
--- a/gl/strerror-override.c
+++ b/gl/strerror-override.c
@@ -1,6 +1,6 @@
/* strerror-override.c --- POSIX compatible system error routine
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 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
@@ -291,6 +291,11 @@ strerror_override (int errnum)
return "State not recoverable";
#endif
+#if GNULIB_defined_EILSEQ
+ case EILSEQ:
+ return "Invalid or incomplete multibyte or wide character";
+#endif
+
default:
return NULL;
}
diff --git a/gl/strerror-override.h b/gl/strerror-override.h
index fe1fb2c229..3b8f24b995 100644
--- a/gl/strerror-override.h
+++ b/gl/strerror-override.h
@@ -1,6 +1,6 @@
/* strerror-override.h --- POSIX compatible system error routine
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 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
@@ -46,7 +46,8 @@
|| GNULIB_defined_EDQUOT \
|| GNULIB_defined_ECANCELED \
|| GNULIB_defined_EOWNERDEAD \
- || GNULIB_defined_ENOTRECOVERABLE
+ || GNULIB_defined_ENOTRECOVERABLE \
+ || GNULIB_defined_EILSEQ
extern const char *strerror_override (int errnum);
# else
# define strerror_override(ignored) NULL
diff --git a/gl/strerror.c b/gl/strerror.c
index 587bd21a6c..80a2f2eea4 100644
--- a/gl/strerror.c
+++ b/gl/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/string.in.h b/gl/string.in.h
index f8d7520eaa..d7a6c9c923 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2013 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
diff --git a/gl/strings.in.h b/gl/strings.in.h
index 7ed88e9a73..4469f86ca7 100644
--- a/gl/strings.in.h
+++ b/gl/strings.in.h
@@ -1,6 +1,6 @@
/* A substitute <strings.h>.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/stripslash.c b/gl/stripslash.c
index ef458c63a9..0e452a95ef 100644
--- a/gl/stripslash.c
+++ b/gl/stripslash.c
@@ -1,6 +1,6 @@
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006, 2009-2012 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/strncasecmp.c b/gl/strncasecmp.c
index bf413b41ba..35840bc01b 100644
--- a/gl/strncasecmp.c
+++ b/gl/strncasecmp.c
@@ -1,5 +1,5 @@
/* strncasecmp.c -- case insensitive string comparator
- Copyright (C) 1998-1999, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2013 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
diff --git a/gl/strndup.c b/gl/strndup.c
index 405387110c..e60268b86e 100644
--- a/gl/strndup.c
+++ b/gl/strndup.c
@@ -1,6 +1,6 @@
/* A replacement function, for systems that lack strndup.
- Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2012 Free Software
+ Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
diff --git a/gl/strnlen.c b/gl/strnlen.c
index d36180dc77..57fdfe7700 100644
--- a/gl/strnlen.c
+++ b/gl/strnlen.c
@@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/strtok_r.c b/gl/strtok_r.c
index e1499bcefa..011cb280b8 100644
--- a/gl/strtok_r.c
+++ b/gl/strtok_r.c
@@ -1,5 +1,5 @@
/* Reentrant string tokenizer. Generic version.
- Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2012 Free Software
+ Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/strverscmp.c b/gl/strverscmp.c
index 490773d4aa..db4f1edc70 100644
--- a/gl/strverscmp.c
+++ b/gl/strverscmp.c
@@ -1,5 +1,5 @@
/* Compare strings while treating digits characters numerically.
- Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2012 Free Software
+ Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
diff --git a/gl/sys_select.in.h b/gl/sys_select.in.h
index 214d75d719..521ccef321 100644
--- a/gl/sys_select.in.h
+++ b/gl/sys_select.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/select.h>.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
@@ -19,14 +19,25 @@
# endif
@PRAGMA_COLUMNS@
-/* On OSF/1, <sys/types.h> and <sys/time.h> include <sys/select.h>.
+/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
+ both include <sys/select.h>.
Simply delegate to the system's header in this case. */
-#if @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TYPES_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) && defined _OSF_SOURCE
+#if (@HAVE_SYS_SELECT_H@ \
+ && ((defined __osf__ && defined _SYS_TYPES_H_ && defined _OSF_SOURCE) \
+ || (defined __sun && defined _SYS_TYPES_H \
+ && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
+ || defined __EXTENSIONS__))) \
+ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H)
# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
-#elif @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TIME_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) && defined _OSF_SOURCE
+#elif (@HAVE_SYS_SELECT_H@ \
+ && ((defined __osf__ && defined _SYS_TIME_H_ && defined _OSF_SOURCE) \
+ || (defined __sun && defined _SYS_TIME_H \
+ && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
+ || defined __EXTENSIONS__))) \
+ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H)
# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
@@ -63,7 +74,7 @@
/* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
of 'struct timeval', and no definition of this type.
- Also, MacOS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
+ Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
in <sys/time.h>.
But avoid namespace pollution on glibc systems. */
# ifndef __GLIBC__
@@ -130,7 +141,7 @@
/* Re-define FD_ISSET to avoid a WSA call while we are not using
network sockets. */
-static inline int
+static int
rpl_fd_isset (SOCKET fd, fd_set * set)
{
u_int i;
diff --git a/gl/sys_socket.c b/gl/sys_socket.c
new file mode 100644
index 0000000000..3f017f8fc6
--- /dev/null
+++ b/gl/sys_socket.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE
+#include "sys/socket.h"
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index f2eda0c3b3..b4cf0c3933 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -1,6 +1,6 @@
/* Provide a sys/socket header file for systems lacking it (read: MinGW)
and for systems where it is incomplete.
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@@ -63,6 +63,11 @@
#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
#define _@GUARD_PREFIX@_SYS_SOCKET_H
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_SYS_SOCKET_INLINE
+# define _GL_SYS_SOCKET_INLINE _GL_INLINE
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -201,7 +206,7 @@ struct msghdr {
/* Re-define FD_ISSET to avoid a WSA call while we are not using
network sockets. */
-static inline int
+_GL_SYS_SOCKET_INLINE int
rpl_fd_isset (SOCKET fd, fd_set * set)
{
u_int i;
@@ -677,6 +682,8 @@ _GL_WARN_ON_USE (accept4, "accept4 is unportable - "
# endif
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
#endif
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h
index 2efc1e92e0..acc36947e3 100644
--- a/gl/sys_stat.in.h
+++ b/gl/sys_stat.in.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat header file.
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 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
@@ -150,6 +150,10 @@
# endif
#endif
+#ifndef S_ISMPX /* AIX */
+# define S_ISMPX(m) 0
+#endif
+
#ifndef S_ISNAM /* Xenix */
# ifdef S_IFNAM
# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
@@ -497,7 +501,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if !GNULIB_defined_rpl_mkdir
-static inline int
+static int
rpl_mkdir (char const *name, mode_t mode)
{
return _mkdir (name);
diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
index d915cee467..656c3f13ad 100644
--- a/gl/sys_time.in.h
+++ b/gl/sys_time.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
@@ -17,37 +17,34 @@
/* Written by Paul Eggert. */
+#ifndef _@GUARD_PREFIX@_SYS_TIME_H
+
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
-#if defined _@GUARD_PREFIX@_SYS_TIME_H
-
-/* Simply delegate to the system's header, without adding anything. */
-# if @HAVE_SYS_TIME_H@
-# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
-# endif
-
-#else
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+#endif
-# define _@GUARD_PREFIX@_SYS_TIME_H
+#ifndef _@GUARD_PREFIX@_SYS_TIME_H
+#define _@GUARD_PREFIX@_SYS_TIME_H
-# if @HAVE_SYS_TIME_H@
-# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
-# else
-# include <time.h>
-# endif
+#if ! @HAVE_SYS_TIME_H@
+# include <time.h>
+#endif
/* On native Windows with MSVC, get the 'struct timeval' type.
Also, on native Windows with a 64-bit time_t, where we are overriding the
'struct timeval' type, get all declarations of system functions whose
signature contains 'struct timeval'. */
-# if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
-# define _GL_INCLUDING_WINSOCK2_H
-# include <winsock2.h>
-# undef _GL_INCLUDING_WINSOCK2_H
-# endif
+#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -55,112 +52,112 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-# ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
-# endif
+#endif
-# if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
+#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
-# if @REPLACE_STRUCT_TIMEVAL@
-# define timeval rpl_timeval
-# endif
+# if @REPLACE_STRUCT_TIMEVAL@
+# define timeval rpl_timeval
+# endif
-# if !GNULIB_defined_struct_timeval
+# if !GNULIB_defined_struct_timeval
struct timeval
{
time_t tv_sec;
long int tv_usec;
};
-# define GNULIB_defined_struct_timeval 1
-# endif
-
+# define GNULIB_defined_struct_timeval 1
# endif
-# ifdef __cplusplus
+#endif
+
+#ifdef __cplusplus
}
-# endif
+#endif
-# if @GNULIB_GETTIMEOFDAY@
-# if @REPLACE_GETTIMEOFDAY@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef gettimeofday
-# define gettimeofday rpl_gettimeofday
-# endif
+#if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_GETTIMEOFDAY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gettimeofday
+# define gettimeofday rpl_gettimeofday
+# endif
_GL_FUNCDECL_RPL (gettimeofday, int,
(struct timeval *restrict, void *restrict)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (gettimeofday, int,
(struct timeval *restrict, void *restrict));
-# else
-# if !@HAVE_GETTIMEOFDAY@
+# else
+# if !@HAVE_GETTIMEOFDAY@
_GL_FUNCDECL_SYS (gettimeofday, int,
(struct timeval *restrict, void *restrict)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
/* Need to cast, because on glibc systems, by default, the second argument is
struct timezone *. */
_GL_CXXALIAS_SYS_CAST (gettimeofday, int,
(struct timeval *restrict, void *restrict));
-# endif
+# endif
_GL_CXXALIASWARN (gettimeofday);
-# elif defined GNULIB_POSIXCHECK
-# undef gettimeofday
-# if HAVE_RAW_DECL_GETTIMEOFDAY
+#elif defined GNULIB_POSIXCHECK
+# undef gettimeofday
+# if HAVE_RAW_DECL_GETTIMEOFDAY
_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
"use gnulib module gettimeofday for portability");
-# endif
# endif
+#endif
/* Hide some function declarations from <winsock2.h>. */
-# if defined _MSC_VER && @HAVE_WINSOCK2_H@
-# if !defined _@GUARD_PREFIX@_UNISTD_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef close
-# define close close_used_without_including_unistd_h
-# else
+#if defined _MSC_VER && @HAVE_WINSOCK2_H@
+# if !defined _@GUARD_PREFIX@_UNISTD_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef close
+# define close close_used_without_including_unistd_h
+# else
_GL_WARN_ON_USE (close,
"close() used without including <unistd.h>");
-# endif
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef gethostname
-# define gethostname gethostname_used_without_including_unistd_h
-# else
+# endif
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gethostname
+# define gethostname gethostname_used_without_including_unistd_h
+# else
_GL_WARN_ON_USE (gethostname,
"gethostname() used without including <unistd.h>");
-# endif
# endif
-# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef socket
-# define socket socket_used_without_including_sys_socket_h
-# undef connect
-# define connect connect_used_without_including_sys_socket_h
-# undef accept
-# define accept accept_used_without_including_sys_socket_h
-# undef bind
-# define bind bind_used_without_including_sys_socket_h
-# undef getpeername
-# define getpeername getpeername_used_without_including_sys_socket_h
-# undef getsockname
-# define getsockname getsockname_used_without_including_sys_socket_h
-# undef getsockopt
-# define getsockopt getsockopt_used_without_including_sys_socket_h
-# undef listen
-# define listen listen_used_without_including_sys_socket_h
-# undef recv
-# define recv recv_used_without_including_sys_socket_h
-# undef send
-# define send send_used_without_including_sys_socket_h
-# undef recvfrom
-# define recvfrom recvfrom_used_without_including_sys_socket_h
-# undef sendto
-# define sendto sendto_used_without_including_sys_socket_h
-# undef setsockopt
-# define setsockopt setsockopt_used_without_including_sys_socket_h
-# undef shutdown
-# define shutdown shutdown_used_without_including_sys_socket_h
-# else
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef socket
+# define socket socket_used_without_including_sys_socket_h
+# undef connect
+# define connect connect_used_without_including_sys_socket_h
+# undef accept
+# define accept accept_used_without_including_sys_socket_h
+# undef bind
+# define bind bind_used_without_including_sys_socket_h
+# undef getpeername
+# define getpeername getpeername_used_without_including_sys_socket_h
+# undef getsockname
+# define getsockname getsockname_used_without_including_sys_socket_h
+# undef getsockopt
+# define getsockopt getsockopt_used_without_including_sys_socket_h
+# undef listen
+# define listen listen_used_without_including_sys_socket_h
+# undef recv
+# define recv recv_used_without_including_sys_socket_h
+# undef send
+# define send send_used_without_including_sys_socket_h
+# undef recvfrom
+# define recvfrom recvfrom_used_without_including_sys_socket_h
+# undef sendto
+# define sendto sendto_used_without_including_sys_socket_h
+# undef setsockopt
+# define setsockopt setsockopt_used_without_including_sys_socket_h
+# undef shutdown
+# define shutdown shutdown_used_without_including_sys_socket_h
+# else
_GL_WARN_ON_USE (socket,
"socket() used without including <sys/socket.h>");
_GL_WARN_ON_USE (connect,
@@ -189,17 +186,18 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
"setsockopt() used without including <sys/socket.h>");
_GL_WARN_ON_USE (shutdown,
"shutdown() used without including <sys/socket.h>");
-# endif
# endif
-# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef select
-# define select select_used_without_including_sys_select_h
-# else
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef select
+# define select select_used_without_including_sys_select_h
+# else
_GL_WARN_ON_USE (select,
"select() used without including <sys/select.h>");
-# endif
# endif
# endif
+#endif
#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
+#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h
index 8139d98f6a..d7da35623b 100644
--- a/gl/sys_types.in.h
+++ b/gl/sys_types.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/sys_uio.in.h b/gl/sys_uio.in.h
index 910bb00b38..fef19dc389 100644
--- a/gl/sys_uio.in.h
+++ b/gl/sys_uio.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/uio.h>.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/sysexits.in.h b/gl/sysexits.in.h
index 8e8c96270f..fa8db8386e 100644
--- a/gl/sysexits.in.h
+++ b/gl/sysexits.in.h
@@ -1,5 +1,5 @@
/* exit() exit codes for some BSD system programs.
- Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2013 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
diff --git a/gl/tests/Makefile.am b/gl/tests/Makefile.am
index f73d26b408..2079cc7b43 100644
--- a/gl/tests/Makefile.am
+++ b/gl/tests/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -103,7 +103,7 @@ EXTRA_DIST += test-base64.c macros.h
## begin gnulib module binary-io
-libtests_a_SOURCES += binary-io.h
+libtests_a_SOURCES += binary-io.h binary-io.c
## end gnulib module binary-io
@@ -167,15 +167,6 @@ EXTRA_DIST += test-dirent.c
## end gnulib module dirent-tests
-## begin gnulib module dup2
-
-
-EXTRA_DIST += dup2.c
-
-EXTRA_libtests_a_SOURCES += dup2.c
-
-## end gnulib module dup2
-
## begin gnulib module dup2-tests
TESTS += test-dup2
diff --git a/gl/tests/binary-io.c b/gl/tests/binary-io.c
new file mode 100644
index 0000000000..8bbdb44d12
--- /dev/null
+++ b/gl/tests/binary-io.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define BINARY_IO_INLINE _GL_EXTERN_INLINE
+#include "binary-io.h"
diff --git a/gl/tests/binary-io.h b/gl/tests/binary-io.h
index a33e32aee2..317fe3d3c2 100644
--- a/gl/tests/binary-io.h
+++ b/gl/tests/binary-io.h
@@ -1,5 +1,5 @@
/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2008-2013 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
@@ -25,6 +25,11 @@
so we include it here first. */
#include <stdio.h>
+_GL_INLINE_HEADER_BEGIN
+#ifndef BINARY_IO_INLINE
+# define BINARY_IO_INLINE _GL_INLINE
+#endif
+
/* set_binary_mode (fd, mode)
sets the binary/text I/O mode of file descriptor fd to the given mode
(must be O_BINARY or O_TEXT) and returns the previous mode. */
@@ -39,9 +44,9 @@
# endif
#else
/* On reasonable systems, binary I/O is the only choice. */
- /* Use an inline function rather than a macro, to avoid gcc warnings
+ /* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
-static inline int
+BINARY_IO_INLINE int
set_binary_mode (int fd, int mode)
{
(void) fd;
@@ -62,4 +67,6 @@ set_binary_mode (int fd, int mode)
# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _BINARY_H */
diff --git a/gl/tests/fcntl.in.h b/gl/tests/fcntl.in.h
index 76e12f78a6..1e45a65a21 100644
--- a/gl/tests/fcntl.in.h
+++ b/gl/tests/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 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
@@ -216,6 +216,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_EXEC O_RDONLY /* This is often close enough in older systems. */
#endif
+#ifndef O_IGNORE_CTTY
+# define O_IGNORE_CTTY 0
+#endif
+
#ifndef O_NDELAY
# define O_NDELAY 0
#endif
@@ -249,10 +253,18 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_NOFOLLOW 0
#endif
+#ifndef O_NOLINK
+# define O_NOLINK 0
+#endif
+
#ifndef O_NOLINKS
# define O_NOLINKS 0
#endif
+#ifndef O_NOTRANS
+# define O_NOTRANS 0
+#endif
+
#ifndef O_RSYNC
# define O_RSYNC 0
#endif
@@ -269,7 +281,7 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_TTY_INIT 0
#endif
-#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
+#if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
# undef O_ACCMODE
# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
#endif
diff --git a/gl/tests/fdopen.c b/gl/tests/fdopen.c
index 6595b16d5d..c717f7130c 100644
--- a/gl/tests/fdopen.c
+++ b/gl/tests/fdopen.c
@@ -1,5 +1,5 @@
/* Open a stream with a given file descriptor.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/ftruncate.c b/gl/tests/ftruncate.c
index e243adda60..db7f7ddf40 100644
--- a/gl/tests/ftruncate.c
+++ b/gl/tests/ftruncate.c
@@ -1,5 +1,5 @@
/* ftruncate emulations for native Windows.
- Copyright (C) 1992-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2013 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
@@ -157,7 +157,7 @@ ftruncate (int fd, off_t length)
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"
-static inline int
+static int
chsize_nothrow (int fd, long length)
{
int result;
diff --git a/gl/tests/getcwd-lgpl.c b/gl/tests/getcwd-lgpl.c
index f1e821b630..d550f35c4e 100644
--- a/gl/tests/getcwd-lgpl.c
+++ b/gl/tests/getcwd-lgpl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2013 Free Software Foundation, Inc.
This file is part of gnulib.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/getpagesize.c b/gl/tests/getpagesize.c
index 02c00fbea4..274c591a2c 100644
--- a/gl/tests/getpagesize.c
+++ b/gl/tests/getpagesize.c
@@ -1,6 +1,6 @@
/* getpagesize emulation for systems where it cannot be done in a C macro.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/glthread/lock.c b/gl/tests/glthread/lock.c
index 9a391ea6c9..f62aa301fe 100644
--- a/gl/tests/glthread/lock.c
+++ b/gl/tests/glthread/lock.c
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 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
@@ -682,7 +682,7 @@ glthread_lock_destroy_func (gl_lock_t *lock)
/* In this file, the waitqueues are implemented as circular arrays. */
#define gl_waitqueue_t gl_carray_waitqueue_t
-static inline void
+static void
gl_waitqueue_init (gl_waitqueue_t *wq)
{
wq->array = NULL;
@@ -743,7 +743,7 @@ gl_waitqueue_add (gl_waitqueue_t *wq)
}
/* Notifies the first thread from a wait queue and dequeues it. */
-static inline void
+static void
gl_waitqueue_notify_first (gl_waitqueue_t *wq)
{
SetEvent (wq->array[wq->offset + 0]);
@@ -754,7 +754,7 @@ gl_waitqueue_notify_first (gl_waitqueue_t *wq)
}
/* Notifies all threads from a wait queue and dequeues them all. */
-static inline void
+static void
gl_waitqueue_notify_all (gl_waitqueue_t *wq)
{
unsigned int i;
diff --git a/gl/tests/glthread/lock.h b/gl/tests/glthread/lock.h
index 6782d498f1..d20bbdefdd 100644
--- a/gl/tests/glthread/lock.h
+++ b/gl/tests/glthread/lock.h
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 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
diff --git a/gl/tests/ignore-value.h b/gl/tests/ignore-value.h
index 2e34435094..63ecde8513 100644
--- a/gl/tests/ignore-value.h
+++ b/gl/tests/ignore-value.h
@@ -1,6 +1,6 @@
/* ignore a function return without a compiler warning
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/infinity.h b/gl/tests/infinity.h
index 631473ecd0..9111289985 100644
--- a/gl/tests/infinity.h
+++ b/gl/tests/infinity.h
@@ -1,5 +1,5 @@
/* Macros for infinity.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/init.sh b/gl/tests/init.sh
index f525a7cab4..bd2048e22d 100644
--- a/gl/tests/init.sh
+++ b/gl/tests/init.sh
@@ -1,6 +1,6 @@
# source this file; set up for tests
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 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
@@ -411,8 +411,7 @@ path_prepend_ ()
case $path_dir_ in
'') fail_ "invalid path dir: '$1'";;
/*) abs_path_dir_=$path_dir_;;
- *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \
- || fail_ "invalid path dir: $path_dir_";;
+ *) abs_path_dir_=$initial_cwd_/$path_dir_;;
esac
case $abs_path_dir_ in
*:*) fail_ "invalid path dir: '$abs_path_dir_'";;
@@ -448,7 +447,7 @@ setup_ ()
pfx_=`testdir_prefix_`
test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
|| fail_ "failed to create temporary directory in $initial_cwd_"
- cd "$test_dir_"
+ cd "$test_dir_" || fail_ "failed to cd to temporary directory"
# As autoconf-generated configure scripts do, ensure that IFS
# is defined initially, so that saving and restoring $IFS works.
diff --git a/gl/tests/inttypes.in.h b/gl/tests/inttypes.in.h
index b9da2b5b09..1893f5569d 100644
--- a/gl/tests/inttypes.in.h
+++ b/gl/tests/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
diff --git a/gl/tests/ioctl.c b/gl/tests/ioctl.c
index aa5df602c0..cd25911291 100644
--- a/gl/tests/ioctl.c
+++ b/gl/tests/ioctl.c
@@ -1,6 +1,6 @@
/* ioctl.c --- wrappers for Windows ioctl function
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
@@ -53,8 +53,6 @@ rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
# include "fd-hook.h"
/* Get _get_osfhandle. */
# include "msvc-nothrow.h"
-/* Get HANDLE */
-# include <windows.h>
static int
primary_ioctl (int fd, int request, void *arg)
diff --git a/gl/tests/lstat.c b/gl/tests/lstat.c
index db119a10d3..1a613a89c8 100644
--- a/gl/tests/lstat.c
+++ b/gl/tests/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2013 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
@@ -35,7 +35,7 @@ typedef int dummy;
# include <sys/stat.h>
# undef __need_system_sys_stat_h
-static inline int
+static int
orig_lstat (const char *filename, struct stat *buf)
{
return lstat (filename, buf);
diff --git a/gl/tests/macros.h b/gl/tests/macros.h
index 478004c1d2..60ba894d89 100644
--- a/gl/tests/macros.h
+++ b/gl/tests/macros.h
@@ -1,5 +1,5 @@
/* Common macros used by gnulib tests.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 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
diff --git a/gl/tests/malloca.c b/gl/tests/malloca.c
index 1f7533a7d3..3cd2f6d99e 100644
--- a/gl/tests/malloca.c
+++ b/gl/tests/malloca.c
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/tests/malloca.h b/gl/tests/malloca.h
index 0cedf5f633..906d47a207 100644
--- a/gl/tests/malloca.h
+++ b/gl/tests/malloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -42,7 +42,7 @@ extern "C" {
and a page size can be as small as 4096 bytes. So we cannot safely
allocate anything larger than 4096 bytes. Also care for the possibility
of a few compiler-allocated temporary stack slots.
- This must be a macro, not an inline function. */
+ This must be a macro, not a function. */
# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
#else
# define safe_alloca(N) ((void) (N), NULL)
diff --git a/gl/tests/minus-zero.h b/gl/tests/minus-zero.h
index 491cef3872..5882cbf757 100644
--- a/gl/tests/minus-zero.h
+++ b/gl/tests/minus-zero.h
@@ -1,5 +1,5 @@
/* Macros for floating-point negative zero.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 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
@@ -24,7 +24,7 @@
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -FLT_MIN * FLT_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static float
compute_minus_zerof (void)
@@ -42,7 +42,7 @@ float minus_zerof = -0.0f;
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static double
compute_minus_zerod (void)
@@ -61,7 +61,7 @@ double minus_zerod = -0.0;
IRIX cc can't put -0.0L into .data, but can compute at runtime.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -LDBL_MIN * LDBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static long double
compute_minus_zerol (void)
diff --git a/gl/tests/nan.h b/gl/tests/nan.h
index 2f75da1574..e95ceb96db 100644
--- a/gl/tests/nan.h
+++ b/gl/tests/nan.h
@@ -1,5 +1,5 @@
/* Macros for not-a-number.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/open.c b/gl/tests/open.c
index 27801b916c..a0c43eadf9 100644
--- a/gl/tests/open.c
+++ b/gl/tests/open.c
@@ -1,5 +1,5 @@
/* Open a descriptor to a file.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
@@ -27,7 +27,7 @@
#include <sys/types.h>
#undef __need_system_fcntl_h
-static inline int
+static int
orig_open (const char *filename, int flags, mode_t mode)
{
return open (filename, flags, mode);
diff --git a/gl/tests/pathmax.h b/gl/tests/pathmax.h
index 03db7cb519..a9ddc33d17 100644
--- a/gl/tests/pathmax.h
+++ b/gl/tests/pathmax.h
@@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/tests/perror.c b/gl/tests/perror.c
index 4853d1b14a..ae5320186e 100644
--- a/gl/tests/perror.c
+++ b/gl/tests/perror.c
@@ -1,5 +1,5 @@
/* Print a message describing error code.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/pipe.c b/gl/tests/pipe.c
index 6fcf1f2cc9..a67cd3fdb0 100644
--- a/gl/tests/pipe.c
+++ b/gl/tests/pipe.c
@@ -1,5 +1,5 @@
/* Create a pipe.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/putenv.c b/gl/tests/putenv.c
index 3c0f7ead33..ed666afc3b 100644
--- a/gl/tests/putenv.c
+++ b/gl/tests/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2012 Free Software
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2013 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
@@ -34,6 +34,11 @@
#include <string.h>
#include <unistd.h>
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
#if _LIBC
# if HAVE_GNU_LD
# define environ __environ
@@ -67,6 +72,21 @@ _unsetenv (const char *name)
len = strlen (name);
+#if HAVE__PUTENV
+ {
+ int putenv_result, putenv_errno;
+ char *name_ = malloc (len + 2);
+ memcpy (name_, name, len);
+ name_[len] = '=';
+ name_[len + 1] = 0;
+ putenv_result = _putenv (name_);
+ putenv_errno = errno;
+ free (name_);
+ __set_errno (putenv_errno);
+ return putenv_result;
+ }
+#else
+
LOCK;
ep = environ;
@@ -87,6 +107,7 @@ _unsetenv (const char *name)
UNLOCK;
return 0;
+#endif
}
@@ -95,9 +116,8 @@ _unsetenv (const char *name)
int
putenv (char *string)
{
- const char *const name_end = strchr (string, '=');
- register size_t size;
- register char **ep;
+ const char *name_end = strchr (string, '=');
+ char **ep;
if (name_end == NULL)
{
@@ -105,30 +125,68 @@ putenv (char *string)
return _unsetenv (string);
}
- size = 0;
- for (ep = environ; *ep != NULL; ++ep)
- if (!strncmp (*ep, string, name_end - string) &&
- (*ep)[name_end - string] == '=')
+#if HAVE__PUTENV
+ /* Rely on _putenv to allocate the new environment. If other
+ parts of the application use _putenv, the !HAVE__PUTENV code
+ would fight over who owns the environ vector, causing a crash. */
+ if (name_end[1])
+ return _putenv (string);
+ else
+ {
+ /* _putenv ("NAME=") unsets NAME, so invoke _putenv ("NAME= ")
+ to allocate the environ vector and then replace the new
+ entry with "NAME=". */
+ int putenv_result, putenv_errno;
+ char *name_x = malloc (name_end - string + sizeof "= ");
+ if (!name_x)
+ return -1;
+ memcpy (name_x, string, name_end - string + 1);
+ name_x[name_end - string + 1] = ' ';
+ name_x[name_end - string + 2] = 0;
+ putenv_result = _putenv (name_x);
+ putenv_errno = errno;
+ for (ep = environ; *ep; ep++)
+ if (strcmp (*ep, name_x) == 0)
+ {
+ *ep = string;
+ break;
+ }
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if (putenv_result == 0)
+ {
+ /* _putenv propagated "NAME= " into the subprocess environment;
+ fix that by calling SetEnvironmentVariable directly. */
+ name_x[name_end - string] = 0;
+ putenv_result = SetEnvironmentVariable (name_x, "") ? 0 : -1;
+ putenv_errno = ENOMEM; /* ENOMEM is the only way to fail. */
+ }
+# endif
+ free (name_x);
+ __set_errno (putenv_errno);
+ return putenv_result;
+ }
+#else
+ for (ep = environ; *ep; ep++)
+ if (strncmp (*ep, string, name_end - string) == 0
+ && (*ep)[name_end - string] == '=')
break;
- else
- ++size;
- if (*ep == NULL)
+ if (*ep)
+ *ep = string;
+ else
{
static char **last_environ = NULL;
- char **new_environ = (char **) malloc ((size + 2) * sizeof (char *));
- if (new_environ == NULL)
+ size_t size = ep - environ;
+ char **new_environ = malloc ((size + 2) * sizeof *new_environ);
+ if (! new_environ)
return -1;
- (void) memcpy ((void *) new_environ, (void *) environ,
- size * sizeof (char *));
- new_environ[size] = (char *) string;
- new_environ[size + 1] = NULL;
+ new_environ[0] = string;
+ memcpy (new_environ + 1, environ, (size + 1) * sizeof *new_environ);
free (last_environ);
last_environ = new_environ;
environ = new_environ;
}
- else
- *ep = string;
+#endif
return 0;
}
diff --git a/gl/tests/randomd.c b/gl/tests/randomd.c
index 0bef8b6fa0..a3097efb4d 100644
--- a/gl/tests/randomd.c
+++ b/gl/tests/randomd.c
@@ -1,5 +1,5 @@
/* Some random 'double' numbers used by gnulib tests.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2013 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
diff --git a/gl/tests/randoml.c b/gl/tests/randoml.c
index b48d49cbf3..4e854ddac9 100644
--- a/gl/tests/randoml.c
+++ b/gl/tests/randoml.c
@@ -1,5 +1,5 @@
/* Some random 'long double' numbers used by gnulib tests.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2013 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
diff --git a/gl/tests/same-inode.h b/gl/tests/same-inode.h
index 8c3900d041..3843b07078 100644
--- a/gl/tests/same-inode.h
+++ b/gl/tests/same-inode.h
@@ -1,6 +1,6 @@
/* Determine whether two stat buffers refer to the same file.
- Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 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
diff --git a/gl/tests/setenv.c b/gl/tests/setenv.c
index 8201be2eb2..995a0f26a1 100644
--- a/gl/tests/setenv.c
+++ b/gl/tests/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -15,14 +15,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#if !_LIBC
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+# define _GL_ARG_NONNULL(params)
+
# define _GL_USE_STDLIB_ALLOC 1
# include <config.h>
#endif
-/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
- optimizes away the name == NULL test below. */
-#define _GL_ARG_NONNULL(params)
-
#include <alloca.h>
/* Specification. */
diff --git a/gl/tests/signature.h b/gl/tests/signature.h
index d9d8b4711b..45a8e02b68 100644
--- a/gl/tests/signature.h
+++ b/gl/tests/signature.h
@@ -1,5 +1,5 @@
/* Macro for checking that a function declaration is compliant.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/stat.c b/gl/tests/stat.c
index 1fc633eeef..f888130d26 100644
--- a/gl/tests/stat.c
+++ b/gl/tests/stat.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in stat.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
@@ -29,6 +29,7 @@
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if _GL_WINDOWS_64_BIT_ST_SIZE
+# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
# define stat _stati64
# define REPLACE_FUNC_STAT_DIR 1
# undef REPLACE_FUNC_STAT_FILE
@@ -41,7 +42,7 @@
# endif
#endif
-static inline int
+static int
orig_stat (const char *filename, struct stat *buf)
{
return stat (filename, buf);
diff --git a/gl/tests/strerror_r.c b/gl/tests/strerror_r.c
index 76f6fc64d2..e86d272a4f 100644
--- a/gl/tests/strerror_r.c
+++ b/gl/tests/strerror_r.c
@@ -1,6 +1,6 @@
/* strerror_r.c --- POSIX compatible system error routine
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 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
diff --git a/gl/tests/symlink.c b/gl/tests/symlink.c
index 642ca66b66..d3c9f21bb7 100644
--- a/gl/tests/symlink.c
+++ b/gl/tests/symlink.c
@@ -1,5 +1,5 @@
/* Stub for symlink().
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/sys_ioctl.in.h b/gl/tests/sys_ioctl.in.h
index ab04d558ed..62024ab03d 100644
--- a/gl/tests/sys_ioctl.in.h
+++ b/gl/tests/sys_ioctl.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <sys/ioctl.h>.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-accept.c b/gl/tests/test-accept.c
index 265ef6493b..2af98afacf 100644
--- a/gl/tests/test-accept.c
+++ b/gl/tests/test-accept.c
@@ -1,5 +1,5 @@
/* Test accepting a connection to a server socket.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -23,6 +23,7 @@ SIGNATURE_CHECK (accept, int, (int, struct sockaddr *, socklen_t *));
#include <errno.h>
#include <netinet/in.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -45,6 +46,7 @@ main (void)
struct sockaddr_in addr;
socklen_t addrlen = sizeof (addr);
+ close (99);
errno = 0;
ASSERT (accept (99, (struct sockaddr *) &addr, &addrlen) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-alloca-opt.c b/gl/tests/test-alloca-opt.c
index 4e814c6f2c..d94e1d1d34 100644
--- a/gl/tests/test-alloca-opt.c
+++ b/gl/tests/test-alloca-opt.c
@@ -1,5 +1,5 @@
/* Test of optional automatic memory allocation.
- Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2013 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
@@ -44,7 +44,7 @@ main ()
{
/* Try various values.
n = 0 gave a crash on Alpha with gcc-2.5.8.
- Some versions of MacOS X have a stack size limit of 512 KB. */
+ Some versions of Mac OS X have a stack size limit of 512 KB. */
func (34);
func (134);
func (399);
diff --git a/gl/tests/test-argp-2.sh b/gl/tests/test-argp-2.sh
index 49eff9c55c..cd6cd499b1 100755
--- a/gl/tests/test-argp-2.sh
+++ b/gl/tests/test-argp-2.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for argp.
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-argp.c b/gl/tests/test-argp.c
index 6ba55e94d2..a96dee86a1 100644
--- a/gl/tests/test-argp.c
+++ b/gl/tests/test-argp.c
@@ -1,5 +1,5 @@
/* Test suite for argp.
- Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-arpa_inet.c b/gl/tests/test-arpa_inet.c
index bda6709593..37f2ec3fae 100644
--- a/gl/tests/test-arpa_inet.c
+++ b/gl/tests/test-arpa_inet.c
@@ -1,5 +1,5 @@
/* Test of <arpa/inet.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-base64.c b/gl/tests/test-base64.c
index 9a533c521a..9debff0686 100644
--- a/gl/tests/test-base64.c
+++ b/gl/tests/test-base64.c
@@ -1,5 +1,5 @@
/* Self tests for base64.
- Copyright (C) 2004, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2008-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-binary-io.c b/gl/tests/test-binary-io.c
index 4f284e7015..b258d51ab0 100644
--- a/gl/tests/test-binary-io.c
+++ b/gl/tests/test-binary-io.c
@@ -1,5 +1,5 @@
/* Test of binary mode I/O.
- Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2013 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
diff --git a/gl/tests/test-bind.c b/gl/tests/test-bind.c
index e97be2a249..fe8541041e 100644
--- a/gl/tests/test-bind.c
+++ b/gl/tests/test-bind.c
@@ -1,5 +1,5 @@
/* Test binding a server socket to a port.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -24,6 +24,7 @@ SIGNATURE_CHECK (bind, int, (int, const struct sockaddr *, socklen_t));
#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -46,6 +47,7 @@ main (void)
ASSERT (errno == EBADF);
}
{
+ close (99);
errno = 0;
ASSERT (bind (99, (const struct sockaddr *) &addr, sizeof (addr)) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-byteswap.c b/gl/tests/test-byteswap.c
index 9893b1d270..2f8e43e512 100644
--- a/gl/tests/test-byteswap.c
+++ b/gl/tests/test-byteswap.c
@@ -1,5 +1,5 @@
/* Test of <byteswap.h> substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-c-ctype.c b/gl/tests/test-c-ctype.c
index a9cb655266..c0aa662ffa 100644
--- a/gl/tests/test-c-ctype.c
+++ b/gl/tests/test-c-ctype.c
@@ -1,5 +1,5 @@
/* Test of character handling in C locale.
- Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2013 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
diff --git a/gl/tests/test-close.c b/gl/tests/test-close.c
index 83f71c06c2..974ed1b6c0 100644
--- a/gl/tests/test-close.c
+++ b/gl/tests/test-close.c
@@ -1,5 +1,5 @@
/* Test closing a file or socket.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -35,6 +35,7 @@ main (void)
ASSERT (errno == EBADF);
}
{
+ close (99);
errno = 0;
ASSERT (close (99) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-connect.c b/gl/tests/test-connect.c
index 9ef892390d..a1cd5f17ba 100644
--- a/gl/tests/test-connect.c
+++ b/gl/tests/test-connect.c
@@ -1,5 +1,5 @@
/* Test connecting a client socket.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -24,6 +24,7 @@ SIGNATURE_CHECK (connect, int, (int, const struct sockaddr *, socklen_t));
#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -47,6 +48,7 @@ main (void)
ASSERT (errno == EBADF);
}
{
+ close (99);
errno = 0;
ASSERT (connect (99, (const struct sockaddr *) &addr, sizeof (addr))
== -1);
diff --git a/gl/tests/test-dirent.c b/gl/tests/test-dirent.c
index 24e175927a..34ef5d94e6 100644
--- a/gl/tests/test-dirent.c
+++ b/gl/tests/test-dirent.c
@@ -1,5 +1,5 @@
/* Test of <dirent.h> substitute.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-dup2.c b/gl/tests/test-dup2.c
index 5043c0c5bf..9600c850b1 100644
--- a/gl/tests/test-dup2.c
+++ b/gl/tests/test-dup2.c
@@ -1,5 +1,5 @@
/* Test duplicating file descriptors.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
@@ -122,6 +122,7 @@ main (void)
errno = 0;
ASSERT (dup2 (-1, fd) == -1);
ASSERT (errno == EBADF);
+ close (99);
errno = 0;
ASSERT (dup2 (99, fd) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-environ.c b/gl/tests/test-environ.c
index 972ed06dcd..cb3d9f6021 100644
--- a/gl/tests/test-environ.c
+++ b/gl/tests/test-environ.c
@@ -1,5 +1,5 @@
/* Test of environ variable.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-errno.c b/gl/tests/test-errno.c
index 8d0071741f..29eb510da0 100644
--- a/gl/tests/test-errno.c
+++ b/gl/tests/test-errno.c
@@ -1,5 +1,5 @@
/* Test of <errno.h> substitute.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-fcntl-h.c b/gl/tests/test-fcntl-h.c
index 00c5468dff..e30ff19b48 100644
--- a/gl/tests/test-fcntl-h.c
+++ b/gl/tests/test-fcntl-h.c
@@ -1,5 +1,5 @@
/* Test of <fcntl.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
@@ -21,9 +21,9 @@
#include <fcntl.h>
/* Check that the various O_* macros are defined. */
-int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK
- | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT
- | O_BINARY | O_TEXT;
+int o = (O_DIRECT | O_DIRECTORY | O_DSYNC | O_IGNORE_CTTY | O_NDELAY | O_NOATIME
+ | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINK | O_NOLINKS | O_NOTRANS
+ | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT);
/* Check that the various SEEK_* macros are defined. */
int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
@@ -61,7 +61,7 @@ main (void)
#if O_SEARCH && O_EXEC != O_SEARCH && O_SEARCH != O_RDONLY
case O_SEARCH:
#endif
- i = O_ACCMODE == (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH);
+ i = ! (~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH));
break;
/* Everyone should have these */
@@ -84,6 +84,9 @@ main (void)
#if O_DSYNC
case O_DSYNC:
#endif
+#if O_IGNORE_CTTY
+ case O_IGNORE_CTTY:
+#endif
#if O_NOATIME
case O_NOATIME:
#endif
@@ -96,9 +99,15 @@ main (void)
#if O_NOFOLLOW
case O_NOFOLLOW:
#endif
+#if O_NOLINK
+ case O_NOLINK:
+#endif
#if O_NOLINKS
case O_NOLINKS:
#endif
+#if O_NOTRANS
+ case O_NOTRANS:
+#endif
#if O_RSYNC && O_RSYNC != O_DSYNC
case O_RSYNC:
#endif
diff --git a/gl/tests/test-fdopen.c b/gl/tests/test-fdopen.c
index 8e2f7bfe2b..671c5e3d1f 100644
--- a/gl/tests/test-fdopen.c
+++ b/gl/tests/test-fdopen.c
@@ -1,5 +1,5 @@
/* Test opening a stream with a file descriptor.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -22,6 +22,7 @@
SIGNATURE_CHECK (fdopen, FILE *, (int, const char *));
#include <errno.h>
+#include <unistd.h>
#include "macros.h"
@@ -42,6 +43,7 @@ main (void)
{
FILE *fp;
+ close (99);
errno = 0;
fp = fdopen (99, "r");
if (fp == NULL)
diff --git a/gl/tests/test-fgetc.c b/gl/tests/test-fgetc.c
index f7ebbc6ad5..b4a617aae2 100644
--- a/gl/tests/test-fgetc.c
+++ b/gl/tests/test-fgetc.c
@@ -1,5 +1,5 @@
/* Test of fgetc() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -77,7 +77,9 @@ main (int argc, char **argv)
}
}
{
- FILE *fp = fdopen (99, "r");
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "r");
if (fp != NULL)
{
errno = 0;
diff --git a/gl/tests/test-float.c b/gl/tests/test-float.c
index 18da40b5e9..ed8388bb8d 100644
--- a/gl/tests/test-float.c
+++ b/gl/tests/test-float.c
@@ -1,5 +1,5 @@
/* Test of <float.h> substitute.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/test-fprintf-posix.h b/gl/tests/test-fprintf-posix.h
index 561c69fd9c..a5b72c781a 100644
--- a/gl/tests/test-fprintf-posix.h
+++ b/gl/tests/test-fprintf-posix.h
@@ -1,5 +1,5 @@
/* Test of POSIX compatible vsprintf() and sprintf() functions.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-fputc.c b/gl/tests/test-fputc.c
index fd92ae8abc..e05f641ed3 100644
--- a/gl/tests/test-fputc.c
+++ b/gl/tests/test-fputc.c
@@ -1,5 +1,5 @@
/* Test of fputc() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -70,7 +70,9 @@ main (int argc, char **argv)
}
}
{
- FILE *fp = fdopen (99, "w");
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
if (fp != NULL)
{
setvbuf (fp, NULL, _IONBF, 0);
diff --git a/gl/tests/test-fread.c b/gl/tests/test-fread.c
index 792299bc13..a807e0a86e 100644
--- a/gl/tests/test-fread.c
+++ b/gl/tests/test-fread.c
@@ -1,5 +1,5 @@
/* Test of fread() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -79,7 +79,9 @@ main (int argc, char **argv)
}
}
{
- FILE *fp = fdopen (99, "r");
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "r");
if (fp != NULL)
{
char buf[1];
diff --git a/gl/tests/test-frexp.c b/gl/tests/test-frexp.c
index 2b6a9fbf1e..6e3e000931 100644
--- a/gl/tests/test-frexp.c
+++ b/gl/tests/test-frexp.c
@@ -1,5 +1,5 @@
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-frexp.h b/gl/tests/test-frexp.h
index 71001df423..e50be148ae 100644
--- a/gl/tests/test-frexp.h
+++ b/gl/tests/test-frexp.h
@@ -1,5 +1,5 @@
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2013 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
diff --git a/gl/tests/test-frexpl.c b/gl/tests/test-frexpl.c
index c5e07b256a..5a5eae52c4 100644
--- a/gl/tests/test-frexpl.c
+++ b/gl/tests/test-frexpl.c
@@ -1,5 +1,5 @@
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-fseek.c b/gl/tests/test-fseek.c
index 1dc03c536f..1b47a8f7c2 100644
--- a/gl/tests/test-fseek.c
+++ b/gl/tests/test-fseek.c
@@ -1,5 +1,5 @@
/* Test of fseek() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-fseeko.c b/gl/tests/test-fseeko.c
index d2b348e173..cadbc65f2d 100644
--- a/gl/tests/test-fseeko.c
+++ b/gl/tests/test-fseeko.c
@@ -1,5 +1,5 @@
/* Test of fseeko() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-fseeko3.c b/gl/tests/test-fseeko3.c
index ffeb50f83a..bd0b13a8db 100644
--- a/gl/tests/test-fseeko3.c
+++ b/gl/tests/test-fseeko3.c
@@ -1,5 +1,5 @@
/* Test of fseeko() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/test-fseeko4.c b/gl/tests/test-fseeko4.c
index 3642d3cb39..8d6d58a46e 100644
--- a/gl/tests/test-fseeko4.c
+++ b/gl/tests/test-fseeko4.c
@@ -1,5 +1,5 @@
/* Test of fseeko() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -57,7 +57,9 @@ main (int argc, char **argv)
}
}
{
- FILE *fp = fdopen (99, "w");
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
if (fp != NULL)
{
errno = 0;
diff --git a/gl/tests/test-fseterr.c b/gl/tests/test-fseterr.c
index 611b0e421f..7390b46638 100644
--- a/gl/tests/test-fseterr.c
+++ b/gl/tests/test-fseterr.c
@@ -1,5 +1,5 @@
/* Test setting the error indicator of a stream.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-fstat.c b/gl/tests/test-fstat.c
index 7f3c3c46dd..8ce15277af 100644
--- a/gl/tests/test-fstat.c
+++ b/gl/tests/test-fstat.c
@@ -1,5 +1,5 @@
/* Tests of fstat() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -22,6 +22,7 @@
SIGNATURE_CHECK (fstat, int, (int, struct stat *));
#include <errno.h>
+#include <unistd.h>
#include "macros.h"
@@ -39,6 +40,7 @@ main (int argc, char *argv[])
{
struct stat statbuf;
+ close (99);
errno = 0;
ASSERT (fstat (99, &statbuf) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-ftell.c b/gl/tests/test-ftell.c
index 08c76aa9f8..d30c49202d 100644
--- a/gl/tests/test-ftell.c
+++ b/gl/tests/test-ftell.c
@@ -1,5 +1,5 @@
/* Test of ftell() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-ftell3.c b/gl/tests/test-ftell3.c
index 9d225a3779..17968e35af 100644
--- a/gl/tests/test-ftell3.c
+++ b/gl/tests/test-ftell3.c
@@ -1,5 +1,5 @@
/* Test of ftell() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-ftello.c b/gl/tests/test-ftello.c
index 5df97cf49e..e5a2b25a7a 100644
--- a/gl/tests/test-ftello.c
+++ b/gl/tests/test-ftello.c
@@ -1,5 +1,5 @@
/* Test of ftello() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-ftello3.c b/gl/tests/test-ftello3.c
index 6908addec5..a7714300f5 100644
--- a/gl/tests/test-ftello3.c
+++ b/gl/tests/test-ftello3.c
@@ -1,5 +1,5 @@
/* Test of ftello() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-ftello4.c b/gl/tests/test-ftello4.c
index 7c46d0c242..b8cd679ac2 100644
--- a/gl/tests/test-ftello4.c
+++ b/gl/tests/test-ftello4.c
@@ -1,5 +1,5 @@
/* Test of ftello() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -54,7 +54,9 @@ main (int argc, char **argv)
}
}
{
- FILE *fp = fdopen (99, "w");
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
if (fp != NULL)
{
errno = 0;
diff --git a/gl/tests/test-ftruncate.c b/gl/tests/test-ftruncate.c
index 9a85314aaa..8b795a87aa 100644
--- a/gl/tests/test-ftruncate.c
+++ b/gl/tests/test-ftruncate.c
@@ -1,5 +1,5 @@
/* Test truncating a file.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -38,6 +38,7 @@ main (int argc, char *argv[])
ASSERT (errno == EBADF);
}
{
+ close (99);
errno = 0;
ASSERT (ftruncate (99, 0) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-func.c b/gl/tests/test-func.c
index 07671040dc..75a6597d71 100644
--- a/gl/tests/test-func.c
+++ b/gl/tests/test-func.c
@@ -1,5 +1,5 @@
/* Test whether __func__ is available
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-fwrite.c b/gl/tests/test-fwrite.c
index 1f3a66d1e6..ef72338d70 100644
--- a/gl/tests/test-fwrite.c
+++ b/gl/tests/test-fwrite.c
@@ -1,5 +1,5 @@
/* Test of fwrite() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -72,7 +72,9 @@ main (int argc, char **argv)
}
}
{
- FILE *fp = fdopen (99, "w");
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
if (fp != NULL)
{
char buf[5] = "world";
diff --git a/gl/tests/test-getaddrinfo.c b/gl/tests/test-getaddrinfo.c
index 512319603f..1b9892f410 100644
--- a/gl/tests/test-getaddrinfo.c
+++ b/gl/tests/test-getaddrinfo.c
@@ -1,6 +1,6 @@
/* Test the getaddrinfo module.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 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
diff --git a/gl/tests/test-getcwd-lgpl.c b/gl/tests/test-getcwd-lgpl.c
index 3010760b2c..e3e7b7a7ba 100644
--- a/gl/tests/test-getcwd-lgpl.c
+++ b/gl/tests/test-getcwd-lgpl.c
@@ -1,5 +1,5 @@
/* Test of getcwd() function.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-getdelim.c b/gl/tests/test-getdelim.c
index daea64650c..6e959186c9 100644
--- a/gl/tests/test-getdelim.c
+++ b/gl/tests/test-getdelim.c
@@ -1,5 +1,5 @@
/* Test of getdelim() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-getline.c b/gl/tests/test-getline.c
index ede1b854b1..134e320a8a 100644
--- a/gl/tests/test-getline.c
+++ b/gl/tests/test-getline.c
@@ -1,5 +1,5 @@
/* Test of getline() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-getopt.c b/gl/tests/test-getopt.c
index e08a834cb8..7caf0273fd 100644
--- a/gl/tests/test-getopt.c
+++ b/gl/tests/test-getopt.c
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-getopt.h b/gl/tests/test-getopt.h
index 978b753c58..450cf0d31a 100644
--- a/gl/tests/test-getopt.h
+++ b/gl/tests/test-getopt.h
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-getopt_long.h b/gl/tests/test-getopt_long.h
index 9d55c65325..345a796ad4 100644
--- a/gl/tests/test-getopt_long.h
+++ b/gl/tests/test-getopt_long.h
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-getpeername.c b/gl/tests/test-getpeername.c
index b0545c634c..91a4b14c64 100644
--- a/gl/tests/test-getpeername.c
+++ b/gl/tests/test-getpeername.c
@@ -1,5 +1,5 @@
/* Test getpeername() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -23,6 +23,7 @@ SIGNATURE_CHECK (getpeername, int, (int, struct sockaddr *, socklen_t *));
#include <errno.h>
#include <netinet/in.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -45,6 +46,7 @@ main (void)
struct sockaddr_in addr;
socklen_t addrlen = sizeof (addr);
+ close (99);
errno = 0;
ASSERT (getpeername (99, (struct sockaddr *) &addr, &addrlen) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-gettimeofday.c b/gl/tests/test-gettimeofday.c
index 4a9d2640a7..2c608769e6 100644
--- a/gl/tests/test-gettimeofday.c
+++ b/gl/tests/test-gettimeofday.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
* Written by Jim Meyering.
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-ignore-value.c b/gl/tests/test-ignore-value.c
index f036134c46..cb4cf145a9 100644
--- a/gl/tests/test-ignore-value.c
+++ b/gl/tests/test-ignore-value.c
@@ -1,6 +1,6 @@
/* Test the "ignore-value" module.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/test-inet_ntop.c b/gl/tests/test-inet_ntop.c
index 34de5f608e..1a916e5ed0 100644
--- a/gl/tests/test-inet_ntop.c
+++ b/gl/tests/test-inet_ntop.c
@@ -1,5 +1,5 @@
/* Test of inet_ntop function.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-inet_pton.c b/gl/tests/test-inet_pton.c
index 844908c749..e8e1fb2654 100644
--- a/gl/tests/test-inet_pton.c
+++ b/gl/tests/test-inet_pton.c
@@ -1,5 +1,5 @@
/* Test of inet_pton function.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-init.sh b/gl/tests/test-init.sh
index a2825cc769..6eb6b439f1 100755
--- a/gl/tests/test-init.sh
+++ b/gl/tests/test-init.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for init.sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-intprops.c b/gl/tests/test-intprops.c
index aeb116813f..8b91a790fa 100644
--- a/gl/tests/test-intprops.c
+++ b/gl/tests/test-intprops.c
@@ -1,5 +1,5 @@
/* Test intprops.h.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/test-inttypes.c b/gl/tests/test-inttypes.c
index 698d3dc82b..db1a97e48c 100644
--- a/gl/tests/test-inttypes.c
+++ b/gl/tests/test-inttypes.c
@@ -1,5 +1,5 @@
/* Test of <inttypes.h> substitute.
- Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2013 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
diff --git a/gl/tests/test-ioctl.c b/gl/tests/test-ioctl.c
index c3aadce8bd..489bccc3ea 100644
--- a/gl/tests/test-ioctl.c
+++ b/gl/tests/test-ioctl.c
@@ -1,5 +1,5 @@
/* Test of ioctl() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -23,6 +23,7 @@
SIGNATURE_CHECK (ioctl, int, (int, int, ...));
#include <errno.h>
+#include <unistd.h>
#include "macros.h"
@@ -39,6 +40,7 @@ main (void)
}
{
int value;
+ close (99);
errno = 0;
ASSERT (ioctl (99, FIONREAD, &value) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-isnand-nolibm.c b/gl/tests/test-isnand-nolibm.c
index aa058b0398..2d57d079cd 100644
--- a/gl/tests/test-isnand-nolibm.c
+++ b/gl/tests/test-isnand-nolibm.c
@@ -1,5 +1,5 @@
/* Test of isnand() substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-isnand.h b/gl/tests/test-isnand.h
index 52d35bf41f..7ea72e98a3 100644
--- a/gl/tests/test-isnand.h
+++ b/gl/tests/test-isnand.h
@@ -1,5 +1,5 @@
/* Test of isnand() substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-isnanf-nolibm.c b/gl/tests/test-isnanf-nolibm.c
index cef9925026..924dccb37a 100644
--- a/gl/tests/test-isnanf-nolibm.c
+++ b/gl/tests/test-isnanf-nolibm.c
@@ -1,5 +1,5 @@
/* Test of isnanf() substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-isnanf.h b/gl/tests/test-isnanf.h
index 10adf30208..60499b5732 100644
--- a/gl/tests/test-isnanf.h
+++ b/gl/tests/test-isnanf.h
@@ -1,5 +1,5 @@
/* Test of isnanf() substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-isnanl-nolibm.c b/gl/tests/test-isnanl-nolibm.c
index 96159f82a0..8f44de2fd6 100644
--- a/gl/tests/test-isnanl-nolibm.c
+++ b/gl/tests/test-isnanl-nolibm.c
@@ -1,5 +1,5 @@
/* Test of isnanl() substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-isnanl.h b/gl/tests/test-isnanl.h
index 8a9e684f9d..06e6a7cefa 100644
--- a/gl/tests/test-isnanl.h
+++ b/gl/tests/test-isnanl.h
@@ -1,5 +1,5 @@
/* Test of isnanl() substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-listen.c b/gl/tests/test-listen.c
index b81558a547..206923faca 100644
--- a/gl/tests/test-listen.c
+++ b/gl/tests/test-listen.c
@@ -1,5 +1,5 @@
/* Test listen() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -22,6 +22,7 @@
SIGNATURE_CHECK (listen, int, (int, int));
#include <errno.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -38,6 +39,7 @@ main (void)
ASSERT (errno == EBADF);
}
{
+ close (99);
errno = 0;
ASSERT (listen (99 ,1) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-lstat.c b/gl/tests/test-lstat.c
index 459bf88793..d520193f31 100644
--- a/gl/tests/test-lstat.c
+++ b/gl/tests/test-lstat.c
@@ -1,5 +1,5 @@
/* Test of lstat() function.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-lstat.h b/gl/tests/test-lstat.h
index 4a81494691..b8f1767af8 100644
--- a/gl/tests/test-lstat.h
+++ b/gl/tests/test-lstat.h
@@ -1,5 +1,5 @@
/* Test of lstat() function.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-malloc-gnu.c b/gl/tests/test-malloc-gnu.c
index 16b3a0a3dd..ca0eafa479 100644
--- a/gl/tests/test-malloc-gnu.c
+++ b/gl/tests/test-malloc-gnu.c
@@ -1,5 +1,5 @@
/* Test of malloc function.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 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
diff --git a/gl/tests/test-malloca.c b/gl/tests/test-malloca.c
index d7732c32c8..7d5e62e87a 100644
--- a/gl/tests/test-malloca.c
+++ b/gl/tests/test-malloca.c
@@ -1,5 +1,5 @@
/* Test of safe automatic memory allocation.
- Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2013 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
@@ -45,7 +45,7 @@ main ()
{
/* Try various values.
n = 0 gave a crash on Alpha with gcc-2.5.8.
- Some versions of MacOS X have a stack size limit of 512 KB. */
+ Some versions of Mac OS X have a stack size limit of 512 KB. */
func (34);
func (134);
func (399);
diff --git a/gl/tests/test-math.c b/gl/tests/test-math.c
index 1375e76ad4..f7d944cbf8 100644
--- a/gl/tests/test-math.c
+++ b/gl/tests/test-math.c
@@ -1,5 +1,5 @@
/* Test of <math.h> substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-memchr.c b/gl/tests/test-memchr.c
index 1298c272d0..0ca45895ec 100644
--- a/gl/tests/test-memchr.c
+++ b/gl/tests/test-memchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-netdb.c b/gl/tests/test-netdb.c
index 2312f3f96f..ce5bbd0621 100644
--- a/gl/tests/test-netdb.c
+++ b/gl/tests/test-netdb.c
@@ -1,5 +1,5 @@
/* Test of <netdb.h> substitute.
- Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2013 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
diff --git a/gl/tests/test-netinet_in.c b/gl/tests/test-netinet_in.c
index d318e4728b..65fbf23ca0 100644
--- a/gl/tests/test-netinet_in.c
+++ b/gl/tests/test-netinet_in.c
@@ -1,5 +1,5 @@
/* Test of <netinet/in.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-open.c b/gl/tests/test-open.c
index b9ec9bfafe..f04144f562 100644
--- a/gl/tests/test-open.c
+++ b/gl/tests/test-open.c
@@ -1,5 +1,5 @@
/* Test of opening a file descriptor.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-open.h b/gl/tests/test-open.h
index cab1d27d9b..babb23907d 100644
--- a/gl/tests/test-open.h
+++ b/gl/tests/test-open.h
@@ -1,5 +1,5 @@
/* Test of opening a file descriptor.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-pathmax.c b/gl/tests/test-pathmax.c
index c6d0ccc5ae..81a0350214 100644
--- a/gl/tests/test-pathmax.c
+++ b/gl/tests/test-pathmax.c
@@ -1,5 +1,5 @@
/* Test of "pathmax.h".
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/test-perror.c b/gl/tests/test-perror.c
index 31e1af708d..ec262995fa 100644
--- a/gl/tests/test-perror.c
+++ b/gl/tests/test-perror.c
@@ -1,5 +1,5 @@
/* Test of perror() function.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-perror2.c b/gl/tests/test-perror2.c
index eae077c63b..197870d4aa 100644
--- a/gl/tests/test-perror2.c
+++ b/gl/tests/test-perror2.c
@@ -1,5 +1,5 @@
/* Test of perror() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/test-pipe.c b/gl/tests/test-pipe.c
index 7ffeb6211c..93b4866e3e 100644
--- a/gl/tests/test-pipe.c
+++ b/gl/tests/test-pipe.c
@@ -1,5 +1,5 @@
/* Test of pipe.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-printf-frexp.c b/gl/tests/test-printf-frexp.c
index d144a5267b..5ecf198555 100644
--- a/gl/tests/test-printf-frexp.c
+++ b/gl/tests/test-printf-frexp.c
@@ -1,5 +1,5 @@
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-printf-frexpl.c b/gl/tests/test-printf-frexpl.c
index ac77781803..0aa3d18bed 100644
--- a/gl/tests/test-printf-frexpl.c
+++ b/gl/tests/test-printf-frexpl.c
@@ -1,5 +1,5 @@
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-printf-posix.h b/gl/tests/test-printf-posix.h
index 53ef90593a..eca40051e6 100644
--- a/gl/tests/test-printf-posix.h
+++ b/gl/tests/test-printf-posix.h
@@ -1,5 +1,5 @@
/* Test of POSIX compatible vsprintf() and sprintf() functions.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-rawmemchr.c b/gl/tests/test-rawmemchr.c
index 9e31500ec8..e31104a98c 100644
--- a/gl/tests/test-rawmemchr.c
+++ b/gl/tests/test-rawmemchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-read-file.c b/gl/tests/test-read-file.c
index aec3c4b054..63cd89eb2a 100644
--- a/gl/tests/test-read-file.c
+++ b/gl/tests/test-read-file.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2007, 2010-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2006-2007, 2010-2013 Free Software Foundation, Inc.
* Written by Simon Josefsson
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-recv.c b/gl/tests/test-recv.c
index 2186b8eabb..353293aaff 100644
--- a/gl/tests/test-recv.c
+++ b/gl/tests/test-recv.c
@@ -1,5 +1,5 @@
/* Test the recv() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -22,6 +22,7 @@
SIGNATURE_CHECK (recv, ssize_t, (int, void *, size_t, int));
#include <errno.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -40,6 +41,7 @@ main (void)
}
{
char byte;
+ close (99);
errno = 0;
ASSERT (recv (99, &byte, 1, 0) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-recvfrom.c b/gl/tests/test-recvfrom.c
index 7f6f6f67b6..6f59a34abf 100644
--- a/gl/tests/test-recvfrom.c
+++ b/gl/tests/test-recvfrom.c
@@ -1,5 +1,5 @@
/* Test the recvfrom() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -25,6 +25,7 @@ SIGNATURE_CHECK (recvfrom, ssize_t,
#include <errno.h>
#include <netinet/in.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -50,6 +51,7 @@ main (void)
struct sockaddr_in addr;
socklen_t addrlen = sizeof (addr);
+ close (99);
errno = 0;
ASSERT (recvfrom (99, &byte, 1, 0, (struct sockaddr *) &addr, &addrlen)
== -1);
diff --git a/gl/tests/test-select-fd.c b/gl/tests/test-select-fd.c
index 32df4b788b..fffc12689e 100644
--- a/gl/tests/test-select-fd.c
+++ b/gl/tests/test-select-fd.c
@@ -1,5 +1,5 @@
/* Test of select() substitute, reading or writing from a given file descriptor.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-select-stdin.c b/gl/tests/test-select-stdin.c
index 75dd855dbf..77c20ccd90 100644
--- a/gl/tests/test-select-stdin.c
+++ b/gl/tests/test-select-stdin.c
@@ -1,5 +1,5 @@
/* Test of select() substitute, reading from stdin.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-select.c b/gl/tests/test-select.c
index f6e193ed76..ccf95d549d 100644
--- a/gl/tests/test-select.c
+++ b/gl/tests/test-select.c
@@ -1,5 +1,5 @@
/* Test of select() substitute.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-select.h b/gl/tests/test-select.h
index 9fe998c1dd..75c8fb1ab1 100644
--- a/gl/tests/test-select.h
+++ b/gl/tests/test-select.h
@@ -1,5 +1,5 @@
/* Test of select() substitute.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
@@ -84,6 +84,9 @@ open_server_socket (void)
s = socket (AF_INET, SOCK_STREAM, 0);
+ x = 1;
+ setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
+
memset (&ia, 0, sizeof (ia));
ia.sin_family = AF_INET;
inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr);
@@ -94,9 +97,6 @@ open_server_socket (void)
exit (77);
}
- x = 1;
- setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
-
if (listen (s, 1) < 0)
{
perror ("listen");
@@ -227,6 +227,29 @@ test_tty (select_fn my_select)
#endif
+static int
+do_select_bad_nfd_nowait (int nfd, select_fn my_select)
+{
+ struct timeval tv0;
+ tv0.tv_sec = 0;
+ tv0.tv_usec = 0;
+ errno = 0;
+ return my_select (nfd, NULL, NULL, NULL, &tv0);
+}
+
+static void
+test_bad_nfd (select_fn my_select)
+{
+ if (do_select_bad_nfd_nowait (-1, my_select) != -1 || errno != EINVAL)
+ failed ("invalid errno after negative nfds");
+ /* Can't test FD_SETSIZE + 1 for EINVAL, since some systems allow
+ dynamically larger set size by redefining FD_SETSIZE anywhere up
+ to the actual maximum fd. */
+ /* if (do_select_bad_nfd_nowait (FD_SETSIZE + 1, my_select) != -1 */
+ /* || errno != EINVAL) */
+ /* failed ("invalid errno after bogus nfds"); */
+}
+
/* Test select(2) on invalid file descriptors. */
static int
@@ -243,6 +266,7 @@ do_select_bad_fd (int fd, int ev, struct timeval *timeout, select_fn my_select)
FD_SET (fd, &wfds);
if (ev & SEL_EXC)
FD_SET (fd, &xfds);
+ errno = 0;
return my_select (fd + 1, &rfds, &wfds, &xfds, timeout);
/* In this case, when fd is invalid, on some platforms, the bit for fd
is left alone in the fd_set, whereas on other platforms it is cleared.
@@ -265,7 +289,7 @@ test_bad_fd (select_fn my_select)
#if !(defined __osf__ || defined WINDOWS_NATIVE)
int fd;
- /* On Linux, MacOS X, *BSD, values of fd like 99 or 399 are discarded
+ /* On Linux, Mac OS X, *BSD, values of fd like 99 or 399 are discarded
by the kernel early and therefore do *not* lead to EBADF, as required
by POSIX. */
# if defined __linux__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__
@@ -273,6 +297,7 @@ test_bad_fd (select_fn my_select)
# else
fd = 99;
# endif
+ close (fd);
if (do_select_bad_fd_nowait (fd, SEL_IN, my_select) == 0 || errno != EBADF)
failed ("invalid fd among rfds");
@@ -426,6 +451,7 @@ test_function (select_fn my_select)
test (test_tty, "TTY", my_select);
#endif
+ result += test (test_bad_nfd, my_select, "Invalid nfd test");
result += test (test_bad_fd, my_select, "Invalid fd test");
result += test (test_connect_first, my_select, "Unconnected socket test");
result += test (test_socket_pair, my_select, "Connected sockets test");
diff --git a/gl/tests/test-send.c b/gl/tests/test-send.c
index 7b068d1c13..2b41e21b99 100644
--- a/gl/tests/test-send.c
+++ b/gl/tests/test-send.c
@@ -1,5 +1,5 @@
/* Test the send() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -22,6 +22,7 @@
SIGNATURE_CHECK (send, ssize_t, (int, const void *, size_t, int));
#include <errno.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -40,6 +41,7 @@ main (void)
}
{
char byte = 'x';
+ close (99);
errno = 0;
ASSERT (send (99, &byte, 1, 0) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-sendto.c b/gl/tests/test-sendto.c
index 1d0e4101d7..536acab2cb 100644
--- a/gl/tests/test-sendto.c
+++ b/gl/tests/test-sendto.c
@@ -1,5 +1,5 @@
/* Test the sendto() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (sendto, ssize_t,
#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -52,6 +53,7 @@ main (void)
}
{
char byte = 'x';
+ close (99);
errno = 0;
ASSERT (sendto (99, &byte, 1, 0,
(const struct sockaddr *) &addr, sizeof (addr))
diff --git a/gl/tests/test-setenv.c b/gl/tests/test-setenv.c
index 4752a11f59..0a53ac4644 100644
--- a/gl/tests/test-setenv.c
+++ b/gl/tests/test-setenv.c
@@ -1,5 +1,5 @@
/* Tests of setenv.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-setsockopt.c b/gl/tests/test-setsockopt.c
index c14d217a7c..323b8e7811 100644
--- a/gl/tests/test-setsockopt.c
+++ b/gl/tests/test-setsockopt.c
@@ -1,5 +1,5 @@
/* Test setsockopt() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -22,6 +22,7 @@
SIGNATURE_CHECK (setsockopt, int, (int, int, int, const void *, socklen_t));
#include <errno.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -43,6 +44,7 @@ main (void)
{
int value = 1;
+ close (99);
errno = 0;
ASSERT (setsockopt (99, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value))
== -1);
diff --git a/gl/tests/test-shutdown.c b/gl/tests/test-shutdown.c
index be9f55005a..781577d84d 100644
--- a/gl/tests/test-shutdown.c
+++ b/gl/tests/test-shutdown.c
@@ -1,5 +1,5 @@
/* Test the shutdown() function.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
@@ -22,6 +22,7 @@
SIGNATURE_CHECK (shutdown, int, (int, int));
#include <errno.h>
+#include <unistd.h>
#include "sockets.h"
#include "macros.h"
@@ -38,6 +39,7 @@ main (void)
ASSERT (errno == EBADF);
}
{
+ close (99);
errno = 0;
ASSERT (shutdown (99, SHUT_RD) == -1);
ASSERT (errno == EBADF);
diff --git a/gl/tests/test-signal-h.c b/gl/tests/test-signal-h.c
index 95290175b6..93c0b716cf 100644
--- a/gl/tests/test-signal-h.c
+++ b/gl/tests/test-signal-h.c
@@ -1,5 +1,5 @@
/* Test of <signal.h> substitute.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-signbit.c b/gl/tests/test-signbit.c
index d9ff91df51..e8ea097ce4 100644
--- a/gl/tests/test-signbit.c
+++ b/gl/tests/test-signbit.c
@@ -1,5 +1,5 @@
/* Test of signbit() substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-sleep.c b/gl/tests/test-sleep.c
index a0a2e7773a..d232cd0a97 100644
--- a/gl/tests/test-sleep.c
+++ b/gl/tests/test-sleep.c
@@ -1,5 +1,5 @@
/* Test of sleep() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-snprintf.c b/gl/tests/test-snprintf.c
index bd66449cee..805735769e 100644
--- a/gl/tests/test-snprintf.c
+++ b/gl/tests/test-snprintf.c
@@ -1,5 +1,5 @@
/* Test of snprintf() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-sockets.c b/gl/tests/test-sockets.c
index f43e011c2c..4e26f068da 100644
--- a/gl/tests/test-sockets.c
+++ b/gl/tests/test-sockets.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Simon Josefsson.
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-stat.c b/gl/tests/test-stat.c
index db9adf9b93..b59dbf44c7 100644
--- a/gl/tests/test-stat.c
+++ b/gl/tests/test-stat.c
@@ -1,5 +1,5 @@
/* Tests of stat.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-stat.h b/gl/tests/test-stat.h
index 2c9afc0156..5409e0589f 100644
--- a/gl/tests/test-stat.h
+++ b/gl/tests/test-stat.h
@@ -1,5 +1,5 @@
/* Tests of stat.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-stdalign.c b/gl/tests/test-stdalign.c
index d4c1d2e8a8..373bf98414 100644
--- a/gl/tests/test-stdalign.c
+++ b/gl/tests/test-stdalign.c
@@ -1,5 +1,5 @@
/* Test of <stdalign.h>.
- Copyright 2009-2012 Free Software Foundation, Inc.
+ Copyright 2009-2013 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
diff --git a/gl/tests/test-stdbool.c b/gl/tests/test-stdbool.c
index c22ca1f87c..3c13ca2cb7 100644
--- a/gl/tests/test-stdbool.c
+++ b/gl/tests/test-stdbool.c
@@ -1,5 +1,5 @@
/* Test of <stdbool.h> substitute.
- Copyright (C) 2002-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007, 2009-2013 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
diff --git a/gl/tests/test-stddef.c b/gl/tests/test-stddef.c
index d7237b3e97..f42b4e05c1 100644
--- a/gl/tests/test-stddef.c
+++ b/gl/tests/test-stddef.c
@@ -1,5 +1,5 @@
/* Test of <stddef.h> substitute.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-stdint.c b/gl/tests/test-stdint.c
index 23b2b28ef0..1c559b0581 100644
--- a/gl/tests/test-stdint.c
+++ b/gl/tests/test-stdint.c
@@ -1,5 +1,5 @@
/* Test of <stdint.h> substitute.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 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
diff --git a/gl/tests/test-stdio.c b/gl/tests/test-stdio.c
index 7bd67c2005..89c654897e 100644
--- a/gl/tests/test-stdio.c
+++ b/gl/tests/test-stdio.c
@@ -1,5 +1,5 @@
/* Test of <stdio.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-stdlib.c b/gl/tests/test-stdlib.c
index 7eeb410d33..6d38156cf5 100644
--- a/gl/tests/test-stdlib.c
+++ b/gl/tests/test-stdlib.c
@@ -1,5 +1,5 @@
/* Test of <stdlib.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-strchrnul.c b/gl/tests/test-strchrnul.c
index f1d092830d..ac3b3dd8e4 100644
--- a/gl/tests/test-strchrnul.c
+++ b/gl/tests/test-strchrnul.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-strerror.c b/gl/tests/test-strerror.c
index 33dd901c7c..6d5db0f528 100644
--- a/gl/tests/test-strerror.c
+++ b/gl/tests/test-strerror.c
@@ -1,5 +1,5 @@
/* Test of strerror() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-strerror_r.c b/gl/tests/test-strerror_r.c
index e164f0a51d..ec43aef9ad 100644
--- a/gl/tests/test-strerror_r.c
+++ b/gl/tests/test-strerror_r.c
@@ -1,5 +1,5 @@
/* Test of strerror_r() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-string.c b/gl/tests/test-string.c
index 56e59741d0..76922d16b7 100644
--- a/gl/tests/test-string.c
+++ b/gl/tests/test-string.c
@@ -1,5 +1,5 @@
/* Test of <string.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-strings.c b/gl/tests/test-strings.c
index 1805e16f6c..7873cfec12 100644
--- a/gl/tests/test-strings.c
+++ b/gl/tests/test-strings.c
@@ -1,5 +1,5 @@
/* Test of <strings.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-strnlen.c b/gl/tests/test-strnlen.c
index cbc1883539..33de935566 100644
--- a/gl/tests/test-strnlen.c
+++ b/gl/tests/test-strnlen.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2010-2013 Free Software Foundation, Inc.
* Written by Eric Blake
*
* This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-strverscmp.c b/gl/tests/test-strverscmp.c
index adf9bbfe2a..1498ccb573 100644
--- a/gl/tests/test-strverscmp.c
+++ b/gl/tests/test-strverscmp.c
@@ -1,5 +1,5 @@
/* Test of strverscmp() function.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/test-symlink.c b/gl/tests/test-symlink.c
index b3caac9235..9966516ef9 100644
--- a/gl/tests/test-symlink.c
+++ b/gl/tests/test-symlink.c
@@ -1,5 +1,5 @@
/* Tests of symlink.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-symlink.h b/gl/tests/test-symlink.h
index a7c407945e..56cdc8406e 100644
--- a/gl/tests/test-symlink.h
+++ b/gl/tests/test-symlink.h
@@ -1,5 +1,5 @@
/* Tests of symlink.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-sys_ioctl.c b/gl/tests/test-sys_ioctl.c
index 725cabf1f1..605ebb0954 100644
--- a/gl/tests/test-sys_ioctl.c
+++ b/gl/tests/test-sys_ioctl.c
@@ -1,5 +1,5 @@
/* Test of <sys/ioctl.h> substitute.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-sys_select.c b/gl/tests/test-sys_select.c
index 78f66eddc9..cd84c0103b 100644
--- a/gl/tests/test-sys_select.c
+++ b/gl/tests/test-sys_select.c
@@ -1,5 +1,5 @@
/* Test of <sys/select.h> substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-sys_socket.c b/gl/tests/test-sys_socket.c
index 271815d1c3..0ac8a33264 100644
--- a/gl/tests/test-sys_socket.c
+++ b/gl/tests/test-sys_socket.c
@@ -1,5 +1,5 @@
/* Test of <sys/socket.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-sys_stat.c b/gl/tests/test-sys_stat.c
index 0702e04f6e..1ce35817b6 100644
--- a/gl/tests/test-sys_stat.c
+++ b/gl/tests/test-sys_stat.c
@@ -1,5 +1,5 @@
/* Test of <sys/stat.h> substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
@@ -49,6 +49,7 @@ int a[] =
S_ISSOCK (S_IFREG),
S_ISDOOR (S_IFREG),
S_ISMPB (S_IFREG),
+ S_ISMPX (S_IFREG),
S_ISNAM (S_IFREG),
S_ISNWK (S_IFREG),
S_ISPORT (S_IFREG),
@@ -191,6 +192,20 @@ verify (!S_ISMPB (S_IFSOCK));
#endif
#ifdef S_IFBLK
+verify (!S_ISMPX (S_IFBLK));
+#endif
+verify (!S_ISMPX (S_IFCHR));
+verify (!S_ISMPX (S_IFDIR));
+verify (!S_ISMPX (S_IFIFO));
+verify (!S_ISMPX (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISMPX (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISMPX (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
verify (!S_ISNAM (S_IFBLK));
#endif
verify (!S_ISNAM (S_IFCHR));
diff --git a/gl/tests/test-sys_time.c b/gl/tests/test-sys_time.c
index 44e21a2771..1389b52008 100644
--- a/gl/tests/test-sys_time.c
+++ b/gl/tests/test-sys_time.c
@@ -1,5 +1,5 @@
/* Test of <sys/time.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-sys_types.c b/gl/tests/test-sys_types.c
index c2af992b6b..1045de7c69 100644
--- a/gl/tests/test-sys_types.c
+++ b/gl/tests/test-sys_types.c
@@ -1,5 +1,5 @@
/* Test of <sys/types.h> substitute.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/test-sys_uio.c b/gl/tests/test-sys_uio.c
index ffb46ce148..df36faf1b8 100644
--- a/gl/tests/test-sys_uio.c
+++ b/gl/tests/test-sys_uio.c
@@ -1,5 +1,5 @@
/* Test of <sys/uio.h> substitute.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 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
diff --git a/gl/tests/test-sys_wait.h b/gl/tests/test-sys_wait.h
index d3726df041..d78b19e092 100644
--- a/gl/tests/test-sys_wait.h
+++ b/gl/tests/test-sys_wait.h
@@ -1,5 +1,5 @@
/* Test of macros shared between <sys/wait.h> and <stdlib.h>.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 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
diff --git a/gl/tests/test-sysexits.c b/gl/tests/test-sysexits.c
index a5333d043a..1d3d24d472 100644
--- a/gl/tests/test-sysexits.c
+++ b/gl/tests/test-sysexits.c
@@ -1,5 +1,5 @@
/* Test of <sysexits.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-time.c b/gl/tests/test-time.c
index acf3d2df6d..c06013675f 100644
--- a/gl/tests/test-time.c
+++ b/gl/tests/test-time.c
@@ -1,5 +1,5 @@
/* Test of <time.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
@@ -26,7 +26,7 @@
struct timespec t1;
#if 0
/* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed
- it's missing on MacOS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw. */
+ it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw. */
pid_t t2;
#endif
diff --git a/gl/tests/test-u64.c b/gl/tests/test-u64.c
index 8be841dfeb..7e425cb0cb 100644
--- a/gl/tests/test-u64.c
+++ b/gl/tests/test-u64.c
@@ -1,5 +1,5 @@
/* Test of <u64.h>
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-unistd.c b/gl/tests/test-unistd.c
index e53fd7a002..5470985a83 100644
--- a/gl/tests/test-unistd.c
+++ b/gl/tests/test-unistd.c
@@ -1,5 +1,5 @@
/* Test of <unistd.h> substitute.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/tests/test-unsetenv.c b/gl/tests/test-unsetenv.c
index 926526d4a4..c369e2afc8 100644
--- a/gl/tests/test-unsetenv.c
+++ b/gl/tests/test-unsetenv.c
@@ -1,5 +1,5 @@
/* Tests of unsetenv.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/tests/test-vasnprintf.c b/gl/tests/test-vasnprintf.c
index 4e548b1ef4..f29b05aeb5 100644
--- a/gl/tests/test-vasnprintf.c
+++ b/gl/tests/test-vasnprintf.c
@@ -1,5 +1,5 @@
/* Test of vasnprintf() and asnprintf() functions.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-vasprintf.c b/gl/tests/test-vasprintf.c
index 4d7635b1cd..459b92d2a2 100644
--- a/gl/tests/test-vasprintf.c
+++ b/gl/tests/test-vasprintf.c
@@ -1,5 +1,5 @@
/* Test of vasprintf() and asprintf() functions.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-vc-list-files-cvs.sh b/gl/tests/test-vc-list-files-cvs.sh
index 68b0a0f954..1dbc532a85 100755
--- a/gl/tests/test-vc-list-files-cvs.sh
+++ b/gl/tests/test-vc-list-files-cvs.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-vc-list-files-git.sh b/gl/tests/test-vc-list-files-git.sh
index 1ea6d8961a..8cbd00b6e0 100755
--- a/gl/tests/test-vc-list-files-git.sh
+++ b/gl/tests/test-vc-list-files-git.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-verify.c b/gl/tests/test-verify.c
index 5ab9c58621..1056b4e4ca 100644
--- a/gl/tests/test-verify.c
+++ b/gl/tests/test-verify.c
@@ -1,6 +1,6 @@
/* Test the "verify" module.
- Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2013 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
diff --git a/gl/tests/test-version-etc.c b/gl/tests/test-version-etc.c
index 36ced60bde..66027f3190 100644
--- a/gl/tests/test-version-etc.c
+++ b/gl/tests/test-version-etc.c
@@ -1,5 +1,5 @@
/* Test suite for version-etc.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-version-etc.sh b/gl/tests/test-version-etc.sh
index 945383bef3..466c959208 100755
--- a/gl/tests/test-version-etc.sh
+++ b/gl/tests/test-version-etc.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for version-etc.
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/gl/tests/test-vfprintf-posix.c b/gl/tests/test-vfprintf-posix.c
index 706ee704bb..53f951c034 100644
--- a/gl/tests/test-vfprintf-posix.c
+++ b/gl/tests/test-vfprintf-posix.c
@@ -1,5 +1,5 @@
/* Test of POSIX compatible vfprintf() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-vprintf-posix.c b/gl/tests/test-vprintf-posix.c
index f64bf831ee..3593b1dbff 100644
--- a/gl/tests/test-vprintf-posix.c
+++ b/gl/tests/test-vprintf-posix.c
@@ -1,5 +1,5 @@
/* Test of POSIX compatible vfprintf() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-vsnprintf.c b/gl/tests/test-vsnprintf.c
index 9ee61c0d12..3353b2eb47 100644
--- a/gl/tests/test-vsnprintf.c
+++ b/gl/tests/test-vsnprintf.c
@@ -1,5 +1,5 @@
/* Test of vsnprintf() function.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/test-wchar.c b/gl/tests/test-wchar.c
index 0d720057e1..92ae8f222d 100644
--- a/gl/tests/test-wchar.c
+++ b/gl/tests/test-wchar.c
@@ -1,5 +1,5 @@
/* Test of <wchar.h> substitute.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/tests/unsetenv.c b/gl/tests/unsetenv.c
index ddbe9a4d29..c58c82f4f4 100644
--- a/gl/tests/unsetenv.c
+++ b/gl/tests/unsetenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2012 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -14,12 +14,12 @@
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>
-
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the name == NULL test below. */
#define _GL_ARG_NONNULL(params)
+#include <config.h>
+
/* Specification. */
#include <stdlib.h>
diff --git a/gl/tests/w32sock.h b/gl/tests/w32sock.h
index ef0b5937e1..44f3a1a0f6 100644
--- a/gl/tests/w32sock.h
+++ b/gl/tests/w32sock.h
@@ -1,6 +1,6 @@
/* w32sock.h --- internal auxiliary functions for Windows socket functions
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/tests/zerosize-ptr.h b/gl/tests/zerosize-ptr.h
index 9c060e79c8..f0e615560a 100644
--- a/gl/tests/zerosize-ptr.h
+++ b/gl/tests/zerosize-ptr.h
@@ -1,5 +1,5 @@
/* Return a pointer to a zero-size object in memory.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 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
diff --git a/gl/time.in.h b/gl/time.in.h
index 04cde057cf..8ced794744 100644
--- a/gl/time.in.h
+++ b/gl/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/time_r.c b/gl/time_r.c
index 74366a0f75..9866299856 100644
--- a/gl/time_r.c
+++ b/gl/time_r.c
@@ -1,6 +1,6 @@
/* Reentrant time functions like localtime_r.
- Copyright (C) 2003, 2006-2007, 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2010-2013 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
diff --git a/gl/timespec.c b/gl/timespec.c
new file mode 100644
index 0000000000..2b6098ed7b
--- /dev/null
+++ b/gl/timespec.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE
+#include "timespec.h"
diff --git a/gl/timespec.h b/gl/timespec.h
index 388ddb83a7..d665e6ccf9 100644
--- a/gl/timespec.h
+++ b/gl/timespec.h
@@ -1,6 +1,6 @@
/* timespec -- System time interface
- Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2012 Free Software
+ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -21,6 +21,11 @@
# include <time.h>
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_TIMESPEC_INLINE
+# define _GL_TIMESPEC_INLINE _GL_INLINE
+#endif
+
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
For each time stamp T, this code assumes that either:
@@ -49,7 +54,7 @@
The (int) cast avoids a gcc -Wconversion warning. */
-static inline int
+_GL_TIMESPEC_INLINE int
timespec_cmp (struct timespec a, struct timespec b)
{
return (a.tv_sec < b.tv_sec ? -1
@@ -59,18 +64,21 @@ timespec_cmp (struct timespec a, struct timespec b)
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
nonnegative. */
-static inline int
+_GL_TIMESPEC_INLINE int
timespec_sign (struct timespec a)
{
return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
}
-struct timespec timespec_add (struct timespec, struct timespec);
-struct timespec timespec_sub (struct timespec, struct timespec);
-struct timespec dtotimespec (double);
+struct timespec timespec_add (struct timespec, struct timespec)
+ _GL_ATTRIBUTE_CONST;
+struct timespec timespec_sub (struct timespec, struct timespec)
+ _GL_ATTRIBUTE_CONST;
+struct timespec dtotimespec (double)
+ _GL_ATTRIBUTE_CONST;
/* Return an approximation to A, of type 'double'. */
-static inline double
+_GL_TIMESPEC_INLINE double
timespectod (struct timespec a)
{
return a.tv_sec + a.tv_nsec / 1e9;
@@ -79,4 +87,6 @@ timespectod (struct timespec a)
void gettime (struct timespec *);
int settime (struct timespec const *);
+_GL_INLINE_HEADER_END
+
#endif
diff --git a/gl/u64.c b/gl/u64.c
new file mode 100644
index 0000000000..04cf7a2994
--- /dev/null
+++ b/gl/u64.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_U64_INLINE _GL_EXTERN_INLINE
+#include "u64.h"
diff --git a/gl/u64.h b/gl/u64.h
index f5ec9ebcb3..d8009ad391 100644
--- a/gl/u64.h
+++ b/gl/u64.h
@@ -1,6 +1,6 @@
/* uint64_t-like operations that work even on hosts lacking uint64_t
- Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 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
@@ -19,6 +19,11 @@
#include <stdint.h>
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_U64_INLINE
+# define _GL_U64_INLINE _GL_INLINE
+#endif
+
/* Return X rotated left by N bits, where 0 < N < 64. */
#define u64rol(x, n) u64or (u64shl (x, n), u64shr (x, 64 - n))
@@ -54,7 +59,7 @@ typedef struct { uint32_t lo, hi; } u64;
/* Given the high and low-order 32-bit quantities HI and LO, return a u64
value representing (HI << 32) + LO. */
-static inline u64
+_GL_U64_INLINE u64
u64hilo (uint32_t hi, uint32_t lo)
{
u64 r;
@@ -64,7 +69,7 @@ u64hilo (uint32_t hi, uint32_t lo)
}
/* Return a u64 value representing LO. */
-static inline u64
+_GL_U64_INLINE u64
u64lo (uint32_t lo)
{
u64 r;
@@ -74,7 +79,7 @@ u64lo (uint32_t lo)
}
/* Return a u64 value representing SIZE. */
-static inline u64
+_GL_U64_INLINE u64
u64size (size_t size)
{
u64 r;
@@ -84,14 +89,14 @@ u64size (size_t size)
}
/* Return X < Y. */
-static inline int
+_GL_U64_INLINE int
u64lt (u64 x, u64 y)
{
return x.hi < y.hi || (x.hi == y.hi && x.lo < y.lo);
}
/* Return X & Y. */
-static inline u64
+_GL_U64_INLINE u64
u64and (u64 x, u64 y)
{
u64 r;
@@ -101,7 +106,7 @@ u64and (u64 x, u64 y)
}
/* Return X | Y. */
-static inline u64
+_GL_U64_INLINE u64
u64or (u64 x, u64 y)
{
u64 r;
@@ -111,7 +116,7 @@ u64or (u64 x, u64 y)
}
/* Return X ^ Y. */
-static inline u64
+_GL_U64_INLINE u64
u64xor (u64 x, u64 y)
{
u64 r;
@@ -121,7 +126,7 @@ u64xor (u64 x, u64 y)
}
/* Return X + Y. */
-static inline u64
+_GL_U64_INLINE u64
u64plus (u64 x, u64 y)
{
u64 r;
@@ -131,7 +136,7 @@ u64plus (u64 x, u64 y)
}
/* Return X << N. */
-static inline u64
+_GL_U64_INLINE u64
u64shl (u64 x, int n)
{
u64 r;
@@ -149,7 +154,7 @@ u64shl (u64 x, int n)
}
/* Return X >> N. */
-static inline u64
+_GL_U64_INLINE u64
u64shr (u64 x, int n)
{
u64 r;
@@ -167,3 +172,5 @@ u64shr (u64 x, int n)
}
#endif
+
+_GL_INLINE_HEADER_END
diff --git a/gl/unistd.c b/gl/unistd.c
new file mode 100644
index 0000000000..6c6a8e268c
--- /dev/null
+++ b/gl/unistd.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
+#include "unistd.h"
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 9115486cf3..675c7e6a55 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2013 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
@@ -14,29 +14,13 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
+#ifndef _@GUARD_PREFIX@_UNISTD_H
+
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
-/* Special invocation convention:
- - On mingw, several headers, including <winsock2.h>, include <unistd.h>,
- but we need to ensure that both the system <unistd.h> and <winsock2.h>
- are completely included before we replace gethostname. */
-#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
- && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
-/* <unistd.h> is being indirectly included for the first time from
- <winsock2.h>; avoid declaring any overrides. */
-# if @HAVE_UNISTD_H@
-# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
-# else
-# error unexpected; report this to bug-gnulib@gnu.org
-# endif
-# define _GL_WINSOCK2_H_WITNESS
-
-/* Normal invocation. */
-#elif !defined _@GUARD_PREFIX@_UNISTD_H
-
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
@@ -79,7 +63,9 @@
/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
/* But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
+# define __need_system_stdlib_h
# include <stdlib.h>
+# undef __need_system_stdlib_h
#endif
/* Native Windows platforms declare chdir, getcwd, rmdir in
@@ -124,9 +110,15 @@
/* Get getopt(), optarg, optind, opterr, optopt.
But avoid namespace pollution on glibc systems. */
#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
+# define __need_getopt
# include <getopt.h>
#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_UNISTD_INLINE
+# define _GL_UNISTD_INLINE _GL_INLINE
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -404,7 +396,7 @@ extern char **environ;
# endif
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
-static inline char ***
+_GL_UNISTD_INLINE char ***
rpl_environ (void)
{
return &environ;
@@ -862,7 +854,7 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void));
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
-static inline int
+_GL_UNISTD_INLINE int
getpagesize ()
{
return _gl_getpagesize ();
@@ -1318,7 +1310,7 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
_GL_ARG_NONNULL ((1)));
# endif
-/* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5
+/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
and FreeBSD 6.4 the second parameter is int. On Solaris 11
2011-10, the first parameter is not const. */
_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
@@ -1530,6 +1522,7 @@ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
_GL_CXXALIASWARN (write);
#endif
+_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_UNISTD_H */
#endif /* _@GUARD_PREFIX@_UNISTD_H */
diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c
index 0ebddf10a6..8fdab32ea5 100644
--- a/gl/vasnprintf.c
+++ b/gl/vasnprintf.c
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2013 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
@@ -275,7 +275,7 @@ decimal_point_char (void)
{
const char *point;
/* Determine it in a multithread-safe way. We know nl_langinfo is
- multithread-safe on glibc systems and MacOS X systems, but is not required
+ multithread-safe on glibc systems and Mac OS X systems, but is not required
to be multithread-safe by POSIX. sprintf(), however, is multithread-safe.
localeconv() is rarely multithread-safe. */
# if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
@@ -1530,7 +1530,7 @@ is_borderline (const char *digits, size_t precision)
/* Returns the number of TCHAR_T units needed as temporary space for the result
of sprintf or SNPRINTF of a single conversion directive. */
-static inline size_t
+static size_t
MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
arg_type type, int flags, size_t width, int has_precision,
size_t precision, int pad_ourselves)
diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h
index dd86914697..7658f505e5 100644
--- a/gl/vasnprintf.h
+++ b/gl/vasnprintf.h
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007-2013 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
diff --git a/gl/vasprintf.c b/gl/vasprintf.c
index 16fc9d5bcb..d0d4a11bf7 100644
--- a/gl/vasprintf.c
+++ b/gl/vasprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2013 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
diff --git a/gl/verify.h b/gl/verify.h
index cef14ad157..cb8e90b542 100644
--- a/gl/verify.h
+++ b/gl/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 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
@@ -125,7 +125,7 @@
extern int (*dummy (void)) [sizeof (struct {...})];
* GCC warns about duplicate declarations of the dummy function if
- -Wredundant_decls is used. GCC 4.3 and later have a builtin
+ -Wredundant-decls is used. GCC 4.3 and later have a builtin
__COUNTER__ macro that can let us generate unique identifiers for
each dummy function, to suppress this warning.
@@ -133,6 +133,10 @@
which do not support _Static_assert, also do not warn about the
last declaration mentioned above.
+ * GCC warns if -Wnested-externs is enabled and verify() is used
+ within a function body; but inside a function, you can always
+ arrange to use verify_expr() instead.
+
* In C++, any struct definition inside sizeof is invalid.
Use a template type to work around the problem. */
diff --git a/gl/version-etc-fsf.c b/gl/version-etc-fsf.c
index c452f40dfb..e1c69da94a 100644
--- a/gl/version-etc-fsf.c
+++ b/gl/version-etc-fsf.c
@@ -1,5 +1,5 @@
/* Variable with FSF copyright information, for version-etc.
- Copyright (C) 1999-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2006, 2009-2013 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
diff --git a/gl/version-etc.c b/gl/version-etc.c
index ae1e44d61d..b7d23ab597 100644
--- a/gl/version-etc.c
+++ b/gl/version-etc.c
@@ -1,5 +1,5 @@
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2013 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
@@ -38,7 +38,7 @@
# define PACKAGE PACKAGE_TARNAME
#endif
-enum { COPYRIGHT_YEAR = 2012 };
+enum { COPYRIGHT_YEAR = 2013 };
/* The three functions below display the --version information the
standard way.
diff --git a/gl/version-etc.h b/gl/version-etc.h
index 5548c023c3..6c3d08431c 100644
--- a/gl/version-etc.h
+++ b/gl/version-etc.h
@@ -1,5 +1,5 @@
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999, 2003, 2005, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2005, 2009-2013 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
diff --git a/gl/vfprintf.c b/gl/vfprintf.c
index bc1bec99d6..fbcd0043d1 100644
--- a/gl/vfprintf.c
+++ b/gl/vfprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to a stream.
- Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2013 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
diff --git a/gl/vprintf.c b/gl/vprintf.c
index 075b3d91d8..8a748ea001 100644
--- a/gl/vprintf.c
+++ b/gl/vprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to a stream.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 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
diff --git a/gl/vsnprintf.c b/gl/vsnprintf.c
index 66852ef7aa..7d4dfbed98 100644
--- a/gl/vsnprintf.c
+++ b/gl/vsnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2013 Free Software Foundation, Inc.
Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/w32sock.h b/gl/w32sock.h
index ef0b5937e1..44f3a1a0f6 100644
--- a/gl/w32sock.h
+++ b/gl/w32sock.h
@@ -1,6 +1,6 @@
/* w32sock.h --- internal auxiliary functions for Windows socket functions
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 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
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index f9bc30c030..b6e4362792 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
diff --git a/gl/xsize.c b/gl/xsize.c
new file mode 100644
index 0000000000..4b4914c2ca
--- /dev/null
+++ b/gl/xsize.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define XSIZE_INLINE _GL_EXTERN_INLINE
+#include "xsize.h"
diff --git a/gl/xsize.h b/gl/xsize.h
index 515327e97f..2922f35305 100644
--- a/gl/xsize.h
+++ b/gl/xsize.h
@@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008-2013 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
@@ -27,6 +27,11 @@
# include <stdint.h>
#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef XSIZE_INLINE
+# define XSIZE_INLINE _GL_INLINE
+#endif
+
/* The size of memory objects is often computed through expressions of
type size_t. Example:
void* p = malloc (header_size + n * element_size).
@@ -48,7 +53,7 @@
((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
/* Sum of two sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -59,7 +64,7 @@ xsum (size_t size1, size_t size2)
}
/* Sum of three sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -69,7 +74,7 @@ xsum3 (size_t size1, size_t size2, size_t size3)
}
/* Sum of four sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -79,7 +84,7 @@ xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
}
/* Maximum of two sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -92,7 +97,7 @@ xmax (size_t size1, size_t size2)
/* Multiplication of a count with an element size, with overflow check.
The count must be >= 0 and the element size must be > 0.
- This is a macro, not an inline function, so that it works correctly even
+ This is a macro, not a function, so that it works correctly even
when N is of a wider type and N > SIZE_MAX. */
#define xtimes(N, ELSIZE) \
((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
@@ -104,4 +109,6 @@ xmax (size_t size1, size_t size2)
#define size_in_bounds_p(SIZE) \
((SIZE) != SIZE_MAX)
+_GL_INLINE_HEADER_END
+
#endif /* _XSIZE_H */
diff --git a/maint.mk b/maint.mk
index 11cb6a6264..2b454a15cc 100644
--- a/maint.mk
+++ b/maint.mk
@@ -2,7 +2,7 @@
# This Makefile fragment tries to be general-purpose enough to be
# used by many projects via the gnulib maintainer-makefile module.
-## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+## Copyright (C) 2001-2013 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
@@ -28,6 +28,28 @@ ifneq ($(build_aux),)
set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)")
endif
+# Helper variables.
+_empty =
+_sp = $(_empty) $(_empty)
+
+# _equal,S1,S2
+# ------------
+# If S1 == S2, return S1, otherwise the empty string.
+_equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+
+# member-check,VARIABLE,VALID-VALUES
+# ----------------------------------
+# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and
+# return it. Die otherwise.
+member-check = \
+ $(strip \
+ $(if $($(1)), \
+ $(if $(findstring $(_sp),$($(1))), \
+ $(error invalid $(1): '$($(1))', expected $(2)), \
+ $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)), \
+ $(error invalid $(1): '$($(1))', expected $(2)))), \
+ $(error $(1) undefined)))
+
# Do not save the original name or timestamp in the .tar.gz file.
# Use --rsyncable if available.
gzip_rsyncable := \
@@ -52,16 +74,16 @@ _dot_escaped_srcdir = $(subst .,\.,$(srcdir))
# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
# when $(srcdir) is not ".".
ifeq ($(srcdir),.)
-_prepend_srcdir_prefix =
+ _prepend_srcdir_prefix =
else
-_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
+ _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
endif
# In order to be able to consistently filter "."-relative names,
# (i.e., with no $(srcdir) prefix), this definition is careful to
# remove any $(srcdir) prefix, and to restore what it removes.
_sc_excl = \
- $(if $(exclude_file_name_regexp--$@),$(exclude_file_name_regexp--$@),^$$)
+ $(or $(exclude_file_name_regexp--$@),^$$)
VC_LIST_EXCEPT = \
$(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
| if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
@@ -78,32 +100,41 @@ VERSION_REGEXP = $(subst .,\.,$(VERSION))
PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
ifeq ($(VC),$(GIT))
-this-vc-tag = v$(VERSION)
-this-vc-tag-regexp = v$(VERSION_REGEXP)
+ this-vc-tag = v$(VERSION)
+ this-vc-tag-regexp = v$(VERSION_REGEXP)
else
-tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
-tag-this-version = $(subst .,_,$(VERSION))
-this-vc-tag = $(tag-package)-$(tag-this-version)
-this-vc-tag-regexp = $(this-vc-tag)
+ tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+ tag-this-version = $(subst .,_,$(VERSION))
+ this-vc-tag = $(tag-package)-$(tag-this-version)
+ this-vc-tag-regexp = $(this-vc-tag)
endif
my_distdir = $(PACKAGE)-$(VERSION)
# Old releases are stored here.
release_archive_dir ?= ../release
+# If RELEASE_TYPE is undefined, but RELEASE is, use its second word.
+# But overwrite VERSION.
+ifdef RELEASE
+ VERSION := $(word 1, $(RELEASE))
+ RELEASE_TYPE ?= $(word 2, $(RELEASE))
+endif
+
+# Validate and return $(RELEASE_TYPE), or die.
+RELEASE_TYPES = alpha beta stable
+release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES))
+
# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
# Use alpha.gnu.org for alpha and beta releases.
# Use ftp.gnu.org for stable releases.
gnu_ftp_host-alpha = alpha.gnu.org
gnu_ftp_host-beta = alpha.gnu.org
gnu_ftp_host-stable = ftp.gnu.org
-gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
+gnu_rel_host ?= $(gnu_ftp_host-$(release-type))
-ifeq ($(gnu_rel_host),ftp.gnu.org)
-url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
-else
-url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
-endif
+url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \
+ http://ftpmirror.gnu.org/$(PACKAGE), \
+ ftp://$(gnu_rel_host)/gnu/$(PACKAGE))
# Override this in cfg.mk if you are using a different format in your
# NEWS file.
@@ -124,7 +155,7 @@ export LC_ALL = C
## Sanity checks. ##
## --------------- ##
-_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
+_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
# Collect the names of rules starting with 'sc_'.
syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
@@ -132,9 +163,9 @@ syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
.PHONY: $(syntax-check-rules)
ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0)
-local-checks-available += $(syntax-check-rules)
+ local-checks-available += $(syntax-check-rules)
else
-local-checks-available += no-vc-detected
+ local-checks-available += no-vc-detected
no-vc-detected:
@echo "No version control files detected; skipping syntax check"
endif
@@ -187,9 +218,11 @@ syntax-check: $(local-check)
#
# in_vc_files | in_files
#
-# grep-E-style regexp denoting the files to check. If no files
-# are specified the default are all the files that are under
-# version control.
+# grep-E-style regexp selecting the files to check. For in_vc_files,
+# the regexp is used to select matching files from the list of all
+# version-controlled files; for in_files, it's from the names printed
+# by "find $(srcdir)". When neither is specified, use all files that
+# are under version control.
#
# containing | non_containing
#
@@ -261,7 +294,7 @@ define _sc_search_regexp
: Filter by file name; \
if test -n "$$in_files"; then \
files=$$(find $(srcdir) | grep -E "$$in_files" \
- | grep -Ev '$(exclude_file_name_regexp--$@)'); \
+ | grep -Ev '$(_sc_excl)'); \
else \
files=$$($(VC_LIST_EXCEPT)); \
if test -n "$$in_vc_files"; then \
@@ -328,8 +361,8 @@ sc_prohibit_atoi_atof:
sp_ = strcmp *\(.+\)
sc_prohibit_strcmp:
@prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \
- exclude=':# *define STRN?EQ\(' \
- halt='$(ME): replace strcmp calls above with STREQ/STRNEQ' \
+ exclude='# *define STRN?EQ\(' \
+ halt='replace strcmp calls above with STREQ/STRNEQ' \
$(_sc_search_regexp)
# Really. You don't want to use this function.
@@ -351,8 +384,9 @@ sc_prohibit_strncpy:
# | xargs --no-run-if-empty \
# perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
sc_prohibit_magic_number_exit:
- @prohibit='(^|[^.])\<(usage|exit) ?\([0-9]|\<error ?\([1-9][0-9]*,' \
- halt='use EXIT_* values rather than magic number' \
+ @prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]' \
+ exclude='exit \(77\)|error ?\(((0|77),|[^,]*)' \
+ halt='use EXIT_* values rather than magic number' \
$(_sc_search_regexp)
# Using EXIT_SUCCESS as the first argument to error is misleading,
@@ -567,8 +601,6 @@ sc_prohibit_c_ctype_without_use:
@h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
$(_sc_header_without_use)
-_empty =
-_sp = $(_empty) $(_empty)
# The following list was generated by running:
# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
@@ -721,6 +753,7 @@ sc_require_test_exit_idiom:
sc_trailing_blank:
@prohibit='[ ]$$' \
halt='found trailing blank(s)' \
+ exclude='^Binary file .* matches$$' \
$(_sc_search_regexp)
# Match lines like the following, but where there is only one space
@@ -741,7 +774,7 @@ _gl_translatable_diag_func_re ?= error
sc_unmarked_diagnostics:
@prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
exclude='(_|ngettext ?)\(' \
- halt='$(ME): found unmarked diagnostic(s)' \
+ halt='found unmarked diagnostic(s)' \
$(_sc_search_regexp)
# Avoid useless parentheses like those in this example:
@@ -775,6 +808,11 @@ sc_prohibit_always_true_header_tests:
' with the corresponding gnulib module, they are always true') \
$(_sc_search_regexp)
+sc_prohibit_defined_have_decl_tests:
+ @prohibit='#[ ]*if(n?def|.*\<defined)\>[ (]+HAVE_DECL_' \
+ halt='HAVE_DECL macros are always defined' \
+ $(_sc_search_regexp)
+
# ==================================================================
gl_other_headers_ ?= \
intprops.h \
@@ -1012,7 +1050,7 @@ sc_redundant_const:
sc_const_long_option:
@prohibit='^ *static.*struct option ' \
exclude='const struct option|struct option const' \
- halt='$(ME): add "const" to the above declarations' \
+ halt='add "const" to the above declarations' \
$(_sc_search_regexp)
NEWS_hash = \
@@ -1059,7 +1097,7 @@ sc_makefile_at_at_check:
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
news-check: NEWS
- if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS \
+ $(AM_V_GEN)if sed -n $(news-check-lines-spec)p $< \
| grep -E $(news-check-regexp) >/dev/null; then \
:; \
else \
@@ -1083,9 +1121,11 @@ fix_po_file_diag = \
'you have changed the set of files with translatable diagnostics;\n\
apply the above patch\n'
-# Verify that all source files using _() are listed in po/POTFILES.in.
+# Verify that all source files using _() (more specifically, files that
+# match $(_gl_translatable_string_re)) are listed in po/POTFILES.in.
po_file ?= $(srcdir)/po/POTFILES.in
generated_files ?= $(srcdir)/lib/*.[ch]
+_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
sc_po_check:
@if test -f $(po_file); then \
grep -E -v '^(#|$$)' $(po_file) \
@@ -1105,7 +1145,7 @@ sc_po_check:
esac; \
files="$$files $$file"; \
done; \
- grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
+ grep -E -l '$(_gl_translatable_string_re)' $$files \
| sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \
diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \
|| { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
@@ -1115,7 +1155,7 @@ sc_po_check:
# Sometimes it is useful to change the PATH environment variable
# in Makefiles. When doing so, it's better not to use the Unix-centric
# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use ":" above; use $$(PATH_SEPARATOR) instead'
+msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead'
sc_makefile_path_separator_check:
@prohibit='PATH[=].*:' \
in_vc_files='akefile|\.mk$$' \
@@ -1126,7 +1166,7 @@ sc_makefile_path_separator_check:
# i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
# and is read-only.
writable-files:
- if test -d $(release_archive_dir); then \
+ $(AM_V_GEN)if test -d $(release_archive_dir); then \
for file in $(DIST_ARCHIVES); do \
for p in ./ $(release_archive_dir)/; do \
test -e $$p$$file || continue; \
@@ -1208,22 +1248,31 @@ sc_Wundef_boolean:
# not be constant, or might overflow a stack. In general, use PATH_MAX as
# a limit, not an array or alloca size.
sc_prohibit_path_max_allocation:
- @prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX' \
+ @prohibit='(\balloca *\([^)]*|\[[^]]*)\bPATH_MAX' \
halt='Avoid stack allocations of size PATH_MAX' \
$(_sc_search_regexp)
sc_vulnerable_makefile_CVE-2009-4029:
@prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
- in_files=$$(find $(srcdir) -name Makefile.in) \
+ in_files='(^|/)Makefile\.in$$' \
halt=$$(printf '%s\n' \
'the above files are vulnerable; beware of running' \
' "make dist*" rules, and upgrade to fixed automake' \
' see http://bugzilla.redhat.com/542609 for details') \
$(_sc_search_regexp)
+sc_vulnerable_makefile_CVE-2012-3386:
+ @prohibit='chmod a\+w \$$\(distdir\)' \
+ in_files='(^|/)Makefile\.in$$' \
+ halt=$$(printf '%s\n' \
+ 'the above files are vulnerable; beware of running' \
+ ' "make distcheck", and upgrade to fixed automake' \
+ ' see http://bugzilla.redhat.com/CVE-2012-3386 for details') \
+ $(_sc_search_regexp)
+
vc-diff-check:
- (unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
- if test -s vc-diffs; then \
+ $(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
+ $(AM_V_at)if test -s vc-diffs; then \
cat vc-diffs; \
echo "Some files are locally modified:" 1>&2; \
exit 1; \
@@ -1239,35 +1288,42 @@ bootstrap-tools ?= autoconf,automake,gnulib
# If it's not already specified, derive the GPG key ID from
# the signed tag we've just applied to mark this release.
-gpg_key_ID ?= \
- $$(git cat-file tag v$(VERSION) \
- | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null \
- | awk '/^\[GNUPG:\] ERRSIG / {print $3; exit}')
+gpg_key_ID ?= \
+ $$(cd $(srcdir) \
+ && git cat-file tag v$(VERSION) \
+ | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null \
+ | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
translation_project_ ?= coordinator@translationproject.org
# Make info-gnu the default only for a stable release.
-ifeq ($(RELEASE_TYPE),stable)
- announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
- announcement_mail_headers_ ?= \
- To: info-gnu@gnu.org \
- Cc: $(announcement_Cc_) \
- Mail-Followup-To: $(PACKAGE_BUGREPORT)
-else
- announcement_Cc_ ?= $(translation_project_)
- announcement_mail_headers_ ?= \
- To: $(PACKAGE_BUGREPORT) \
- Cc: $(announcement_Cc_)
-endif
-
+announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_stable = \
+ To: info-gnu@gnu.org \
+ Cc: $(announcement_Cc_) \
+ Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+announcement_Cc_alpha = $(translation_project_)
+announcement_mail_headers_alpha = \
+ To: $(PACKAGE_BUGREPORT) \
+ Cc: $(announcement_Cc_)
+
+announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha)
+announcement_mail_headers_beta = $(announcement_mail_headers_alpha)
+
+announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
+announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
announcement: NEWS ChangeLog $(rel-files)
- @$(srcdir)/$(_build-aux)/announce-gen \
+# Not $(AM_V_GEN) since the output of this command serves as
+# announcement message: it would start with " GEN announcement".
+ $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \
--mail-headers='$(announcement_mail_headers_)' \
- --release-type=$(RELEASE_TYPE) \
+ --release-type=$(release-type) \
--package=$(PACKAGE) \
--prev=$(PREV_VERSION) \
--curr=$(VERSION) \
--gpg-key-id=$(gpg_key_ID) \
+ --srcdir=$(srcdir) \
--news=$(srcdir)/NEWS \
--bootstrap-tools=$(bootstrap-tools) \
$$(case ,$(bootstrap-tools), in (*,gnulib,*) \
@@ -1275,6 +1331,12 @@ announcement: NEWS ChangeLog $(rel-files)
--no-print-checksums \
$(addprefix --url-dir=, $(url_dir_list))
+.PHONY: release-commit
+release-commit:
+ $(AM_V_GEN)cd $(srcdir) \
+ && $(_build-aux)/do-release-commit-and-tag \
+ -C $(abs_builddir) $(RELEASE)
+
## ---------------- ##
## Updating files. ##
## ---------------- ##
@@ -1283,16 +1345,22 @@ ftp-gnu = ftp://ftp.gnu.org/gnu
www-gnu = http://www.gnu.org
upload_dest_dir_ ?= $(PACKAGE)
+upload_command = \
+ $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \
+ --to $(gnu_rel_host):$(upload_dest_dir_) \
+ $(rel-files)
emit_upload_commands:
@echo =====================================
@echo =====================================
- @echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\"
- @echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\"
- @echo " $(rel-files)"
+ @echo '$(upload_command)'
@echo '# send the ~/announce-$(my_distdir) e-mail'
@echo =====================================
@echo =====================================
+.PHONY: upload
+upload:
+ $(AM_V_GEN)$(upload_command)
+
define emit-commit-log
printf '%s\n' 'maint: post-release administrivia' '' \
'* NEWS: Add header line for next release.' \
@@ -1302,7 +1370,8 @@ endef
.PHONY: no-submodule-changes
no-submodule-changes:
- if test -d $(srcdir)/.git; then \
+ $(AM_V_GEN)if test -d $(srcdir)/.git \
+ && git --version >/dev/null 2>&1; then \
diff=$$(cd $(srcdir) && git submodule -q foreach \
git diff-index --name-only HEAD) \
|| exit 1; \
@@ -1320,10 +1389,12 @@ submodule-checks ?= no-submodule-changes public-submodule-commit
# cannot be built from a fresh clone.
.PHONY: public-submodule-commit
public-submodule-commit:
- $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+ $(AM_V_GEN)if test -d $(srcdir)/.git \
+ && git --version >/dev/null 2>&1; then \
cd $(srcdir) && \
- git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \
- = '$$(git merge-base origin $$sha1)' \
+ git submodule --quiet foreach \
+ test '"$$(git rev-parse "$$sha1")"' \
+ = '"$$(git merge-base origin "$$sha1")"' \
|| { echo '$(ME): found non-public submodule commit' >&2; \
exit 1; }; \
else \
@@ -1338,19 +1409,22 @@ public-submodule-commit:
gl_public_submodule_commit ?= public-submodule-commit
check: $(gl_public_submodule_commit)
-.PHONY: alpha beta stable
+.PHONY: alpha beta stable release
ALL_RECURSIVE_TARGETS += alpha beta stable
alpha beta stable: $(local-check) writable-files $(submodule-checks)
- test $@ = stable \
+ $(AM_V_GEN)test $@ = stable \
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|| :
- $(MAKE) vc-diff-check
- $(MAKE) news-check
- $(MAKE) distcheck
- $(MAKE) dist
- $(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
- $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+ $(AM_V_at)$(MAKE) vc-diff-check
+ $(AM_V_at)$(MAKE) news-check
+ $(AM_V_at)$(MAKE) distcheck
+ $(AM_V_at)$(MAKE) dist
+ $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
+ $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+
+release:
+ $(AM_V_GEN)$(MAKE) $(release-type)
# Override this in cfg.mk if you follow different procedures.
release-prep-hook ?= release-prep
@@ -1358,19 +1432,19 @@ release-prep-hook ?= release-prep
gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
.PHONY: release-prep
release-prep:
- case $$RELEASE_TYPE in alpha|beta|stable) ;; \
- *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
- $(MAKE) --no-print-directory -s announcement > ~/announce-$(my_distdir)
- if test -d $(release_archive_dir); then \
+ $(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \
+ > ~/announce-$(my_distdir)
+ $(AM_V_at)if test -d $(release_archive_dir); then \
ln $(rel-files) $(release_archive_dir); \
chmod a-w $(rel-files); \
fi
- echo $(VERSION) > $(prev_version_file)
- $(MAKE) update-NEWS-hash
- perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS
- $(emit-commit-log) > .ci-msg
- $(VC) commit -F .ci-msg -a
- rm .ci-msg
+ $(AM_V_at)echo $(VERSION) > $(prev_version_file)
+ $(AM_V_at)$(MAKE) update-NEWS-hash
+ $(AM_V_at)perl -pi \
+ -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' \
+ $(srcdir)/NEWS
+ $(AM_V_at)msg=$$($(emit-commit-log)) || exit 1; \
+ cd $(srcdir) && $(VC) commit -m "$$msg" -a
# Override this with e.g., -s $(srcdir)/some_other_name.texi
# if the default $(PACKAGE)-derived name doesn't apply.
@@ -1378,14 +1452,20 @@ gendocs_options_ ?=
.PHONY: web-manual
web-manual:
- @test -z "$(manual_title)" \
+ $(AM_V_GEN)test -z "$(manual_title)" \
&& { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
- @cd '$(srcdir)/doc'; \
+ $(AM_V_at)cd '$(srcdir)/doc'; \
$(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \
-o '$(abs_builddir)/doc/manual' \
--email $(PACKAGE_BUGREPORT) $(PACKAGE) \
"$(PACKAGE_NAME) - $(manual_title)"
- @echo " *** Upload the doc/manual directory to web-cvs."
+ $(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs."
+
+.PHONY: web-manual-update
+web-manual-update:
+ $(AM_V_GEN)cd $(srcdir) \
+ && $(_build-aux)/gnu-web-doc-update -C $(abs_builddir)
+
# Code Coverage
@@ -1411,6 +1491,31 @@ gen-coverage:
coverage: init-coverage build-coverage gen-coverage
+# Some projects carry local adjustments for gnulib modules via patches in
+# a gnulib patch directory whose default name is gl/ (defined in bootstrap
+# via local_gl_dir=gl). Those patches become stale as the originals evolve
+# in gnulib. Use this rule to refresh any stale patches. It applies each
+# patch to the original in $(gnulib_dir) and uses the temporary result to
+# generate a fuzz-free .diff file. If you customize the name of your local
+# gnulib patch directory via bootstrap.conf, this rule detects that name.
+# Run this from a non-VPATH (i.e., srcdir) build directory.
+.PHONY: refresh-gnulib-patches
+refresh-gnulib-patches:
+ gl=gl; \
+ if test -f bootstrap.conf; then \
+ t=$$(perl -lne '/^\s*local_gl_dir=(\S+)/ and $$d=$$1;' \
+ -e 'END{defined $$d and print $$d}' bootstrap.conf); \
+ test -n "$$t" && gl=$$t; \
+ fi; \
+ for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \
+ b=$$(printf %s "$$diff"|sed 's/\.diff$$//'); \
+ VERSION_CONTROL=none \
+ patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \
+ ( cd $(gnulib_dir) || exit 1; \
+ git diff "$$b" > "../$$gl/$$diff"; \
+ git checkout $$b ) || exit 1; \
+ done
+
# Update gettext files.
PACKAGE ?= $(shell basename $(PWD))
PO_DOMAIN ?= $(PACKAGE)
@@ -1444,7 +1549,7 @@ update-copyright-env ?=
# in the file .x-update-copyright.
.PHONY: update-copyright
update-copyright:
- grep -l -w Copyright \
+ $(AM_V_GEN)grep -l -w Copyright \
$$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
| $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@
@@ -1517,6 +1622,7 @@ _gl_TS_obj_files ?= *.$(OBJEXT)
# Files in which to search for the one-line style extern declarations.
# $(_gl_TS_dir)-relative.
_gl_TS_headers ?= $(noinst_HEADERS)
+_gl_TS_other_headers ?= *.h
.PHONY: _gl_tight_scope
_gl_tight_scope: $(bin_PROGRAMS)
@@ -1539,7 +1645,8 @@ _gl_tight_scope: $(bin_PROGRAMS)
&& { echo the above functions should have static scope >&2; \
exit 1; } || : ; \
( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars); \
- perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h \
+ perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' \
+ $$hdr $(_gl_TS_other_headers) \
) | sort -u > $$t; \
nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p' \
| sort -u | grep -Ev -f $$t \